[thelist] image onload event

Kevin Stevens kjs at ratking.co.uk
Tue Jan 8 15:00:48 CST 2002


> I need to guarantee that an image is fully loaded before firing a
> function. Easy enough in html with the onload parameter, but I am
> preloading a larger image after a user clicks on the thumbnail, then
> using the height and width of the image to open a popup of the same size
> as the image. The images are uploaded to the site by users, for viewing
> by different users.

My JavaScript is way rusty, so apologies if this is not possible. Could you
blank out the thumbnail with a 1 pixel gif the same as the background colour
and then have an OnLoad function to replace this with a 1 pixel transparent
gif to display the thumbnail when the larger picture is loaded?

Kevin Stevens
kjs at ratking.co.uk





More information about the thelist mailing list