Click to See Complete Forum and Search --> : Preloading images


Inner429
02-09-2003, 10:50 PM
I was wondering if anyone had a code to preload all the images on a website that would load them after clicking on the splash image but before loading the main page of the site. any help?

khalidali63
02-09-2003, 11:02 PM
if(docment.images){
var img = new Image();
img.src = "imageFilePath.gif";
}

typically the above lines will preload an image and create an image object.

if you want to do it for multiple images you will have to create an array of images.

hope this guides you to right direction..

cheers

Khalid

pyro
02-09-2003, 11:04 PM
Is this http://www.dynamicdrive.com/dynamicindex4/preloadimage.htm what you are looking for?