[Javascript] image preloading.

Peter Brunone peter at brunone.com
Fri Mar 30 11:07:57 CST 2001


    It's rather unclear what exactly is going wrong here (error message?
slow loading?), but...

    Variables in a page have only page scope; they can't be used across
pages, so when you open a new window, you have to create another image
variable for the page in that window.

----- Original Message -----
From: "Antillon Reyes Rafael Martin - EXT" <ExtRAntil at vto.com>
To: <javascript at LaTech.edu>
Sent: Friday, March 30, 2001 10:43 AM
Subject: [Javascript] image preloading.


Hello everyone:

My problem is this: When i get to a part of the code,
ie opening a window, i gotta be sure the image contained
in that new window´s been already preloaded. I use something
like this:

var preLoadImg = new Image();
preLoadImg.src = "http://www.whatever.com/blah.jpg"

So i think when it goes to the next instruction it SHOULD have
the image preloaded. But it doesn´t. What´s wrong???
any suggestion??

Thanx in advance, hope you answer me soon.



_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript






More information about the Javascript mailing list