JavaScript check when image has downloaded?
Posted: Wed Jun 21, 2006 2:17 pm
I have a script which rotates images in a gallery. It uses AJAX to change the "src" property of a set of images, then replaces them in the markup of the page. The AJAX is irrelevant to my question though (I think).
The problem I'm facing is that I can't physically determine when the images are downloaded and ready to display. I can only tell when I have correctly changed the src property.
Does anybody have a solution to checking if the image has downloaded, or maybe a solution that actually uses AJAX to download the image data rather than just changing the src property because at least then I can use the event onreadystatechange?
Thanks,
d11wtq
The problem I'm facing is that I can't physically determine when the images are downloaded and ready to display. I can only tell when I have correctly changed the src property.
Does anybody have a solution to checking if the image has downloaded, or maybe a solution that actually uses AJAX to download the image data rather than just changing the src property because at least then I can use the event onreadystatechange?
Thanks,
d11wtq