How to pre-load images?

P

Paul M

Hi

try this
put this in the head

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

//-->
</script>


put this in the body the <body part is the opening body tag and change the
images to yours

<body
onLoad="MM_preloadImages('images/pageimages/index/images/index_over_06.gif','images/pageimages/index/images/index_over_07.gif','images/pageimages/index/images/index_over_08.gif','images/pageimages/index/images/index_over_09.gif')">

Paul M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top