PDA

View Full Version : Display ''preloading images'' message


Membie
12-08-2002, 09:51 PM
I use this script to preload my images

<script language="JavaScript">
<!--
var g_iimg = new Array("Image1.jpg", "Image2.jpg",
"Etc.jpg")// list images to preload

var preload=new Array() // preloads images
for (i=0;i<=g_iimg.length-1;i++) {
preload[i]=new Image()
preload[i].src=g_iimg[i]
}
// -->
</script>

There are 55 pictures to be preloaded (and more in future), so it 'may' take a while :( for even the first image to be displayed.

Is it possible to display a "Just a moment: images are loading" message, in the center place of where, eventually, the pictures are shown, and just as long as the preloading takes? How?

Great tnkx in adv.

Graeme Hackston
12-08-2002, 10:43 PM
http://www.codingforums.com/showthread.php?s=&threadid=2565

Membie
12-09-2002, 12:26 AM
Thank you, but I think I'm going to use it like This (beta version)... (http://www.thermenprinsejagt.nl/Preloader_images.html) and use a cookie to check if images are already loaded (once before).

Thanks for your help though. Promise to first search better next time ;)