Preload Image

wwagner4719

New Member
I want to preload my images so that they pop up when the page opens. What is the best way to do this? I've used the preload option in behaviours section of DW MX 2004, but still get delay when images come up.
 

DLPerry

New Member
I want to preload my images so that they pop up when the page opens. What is the best way to do this? I've used the preload option in behaviours section of DW MX 2004, but still get delay when images come up.

This may be what the DW behaviors setting does, but, just in case....you can put the following javascript in the HEAD section of your page. You'll need to change the values to your specific domain and image information, as well as change the (width,height) for each image.

<SCRIPT language="JavaScript">
<!--
if (document.images)
{
pic1= new Image(100,25);
pic1.src="http://domain.name/image1.name";

pic2= new Image(240,55);
pic2.src="http://domain.name/image2.name";

pic3= new Image(88,31);
pic3.src="http://domain.name/image3.name";
}
//-->
</SCRIPT>

(NOTE: The higher in the HEAD section you can place this script - the sooner the images will pre-load.)

hth
 
Top