[thelist] determine when image has loaded

Oliver Lineham oliver at lineham.co.nz
Tue, 30 Nov 1999 00:14:16 +1300


Is it possible to determine when an image has loaded, using Javascript?

This has various applications, but comes down to being able to tell when an 
image has been cached and accessible by an object.

foo = new Image;
foo.src = "somefile.gif";

That's fine, but can one determine when the image has actually been downloaded?

____________________________________________________
     v i b e   m e d i a    http://www.vibe.co.nz/
   wellington, new zealand    oliver@lineham.co.nz
ph +644 566-0627  mb +6421 2107845  fx +644 570-1900