amber438
08-14-2003, 09:03 AM
I use a thumbnail mousover for a few pages..I wanted the script to randomly pull pictures from the folder on the server instead of putting in the whole link to the picture on each one..
can this be done?
here is the main script
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
//-->
</script>
<script>
//Thumbnail image viewer
var ie = document.all
var ns6 = document.getElementById && !document.all
function showThumbnail(which,e)
{
if( ie || ns6 )
{
crossobj = document.getElementById ? document.getElementById("showimage") : document.all.showimage;
if(crossobj.style.visibility == "hidden")
{
crossobj.style.left = ns6 ? pageXOffset + e.clientX + 20 : document.body.scrollLeft + e.clientX + 20;
crossobj.style.top = ns6 ? pageYOffset + e.clientY : document.body.scrollTop + e.clientY;
crossobj.style.visibility = "visible";
crossobj.innerHTML = //'<div style="background: #ffffff" align="right"><font color="black" style="font-family: Verdana; font-size: 11px;">' +
//'<b><a href="#" onClick="return closeThumbnail()" style="color: #0000ff; text-decoration: none;">Close</a> </b>' +
//'</font></div>
'<img src="' + which + '">';
}
else
{
crossobj.style.visibility = "hidden";
}
return false;
}
else
{
return true;
}
}
function closeThumbnail()
{
crossobj.style.visibility="hidden";
return false;
}
</script>
and here is the script per link
<a hrefwhatever yrl I need" target="_blank" onMouseOver="showThumbnail('whatever the real thumb url is',event)" onMouseOut="closeThumbnail()">><font size="2" face="Arial, Helvetica, sans-serif">description</font> <!-- <img src="whateverthe real thumb url is"> --></a><br>
any ideas?? thanks
can this be done?
here is the main script
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
//-->
</script>
<script>
//Thumbnail image viewer
var ie = document.all
var ns6 = document.getElementById && !document.all
function showThumbnail(which,e)
{
if( ie || ns6 )
{
crossobj = document.getElementById ? document.getElementById("showimage") : document.all.showimage;
if(crossobj.style.visibility == "hidden")
{
crossobj.style.left = ns6 ? pageXOffset + e.clientX + 20 : document.body.scrollLeft + e.clientX + 20;
crossobj.style.top = ns6 ? pageYOffset + e.clientY : document.body.scrollTop + e.clientY;
crossobj.style.visibility = "visible";
crossobj.innerHTML = //'<div style="background: #ffffff" align="right"><font color="black" style="font-family: Verdana; font-size: 11px;">' +
//'<b><a href="#" onClick="return closeThumbnail()" style="color: #0000ff; text-decoration: none;">Close</a> </b>' +
//'</font></div>
'<img src="' + which + '">';
}
else
{
crossobj.style.visibility = "hidden";
}
return false;
}
else
{
return true;
}
}
function closeThumbnail()
{
crossobj.style.visibility="hidden";
return false;
}
</script>
and here is the script per link
<a hrefwhatever yrl I need" target="_blank" onMouseOver="showThumbnail('whatever the real thumb url is',event)" onMouseOut="closeThumbnail()">><font size="2" face="Arial, Helvetica, sans-serif">description</font> <!-- <img src="whateverthe real thumb url is"> --></a><br>
any ideas?? thanks