I'm not sure exactly what you want. But I give it a go. You can preload images by adding this within the <body> tag:
Code:
onLoad="preloadImages('YourImage.gif')"
And add the folowing JaveScript:
Code:
<script language="javascript">
function preloadImages() {
var d=document; if(d.images){ if(!d.p) d.p=new Array();
var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}
</script>
If you want to preload multiple images, use:
Code:
onLoad="preloadImages('YourImage.gif','YourImage2.gif','YourImage3.gif')"
I hope this helps!
Last edited by kline11; 06-09-2010 at 07:42 PM..
|