preload image in $file ?!?!?!
Posted: Thu Jul 26, 2007 7:25 pm
Good day to you all,
Is it possible and how can I generate from a variable (which is reading trough a directory to find images) to get those images upload before the page load ?
Let say I'm using that javascript to preload image :
Thank for your help !
Is it possible and how can I generate from a variable (which is reading trough a directory to find images) to get those images upload before the page load ?
Let say I'm using that javascript to preload image :
Code: Select all
<SCRIPT language="JavaScript">
<!--
if (document.images)
{
preload_image_object = new Image();
// set image url
image_url = new Array();
image_url[0] = "http://mydomain.com/image0.gif";
image_url[1] = "http://mydomain.com/image1.gif";
image_url[2] = "http://mydomain.com/image2.gif";
image_url[3] = "http://mydomain.com/image3.gif";
var i = 0;
for(i=0; i<=3; i++)
preload_image_object.src = image_url[i];
}
//-->
</SCRIPT>Thank for your help !