Click to See Complete Forum and Search --> : reset load status 'complete' of images


markvl
01-16-2003, 03:26 PM
I'm changing images on a page by changing the SRC of the image with javascript. This works well. I'm using a test like if(document.images.MyDia.complete) to see if a image has loaded completely. After which I would like to show it for so many seconds. This works, but only for the first image. The status 'complete' is not reset (from true to false) when I change the SRC to the next picture.
And when resetting it manually it will always stay false.

How can I (let) reset the complete-status in the right way. Or can I do it a different way?

gil davis
01-16-2003, 05:55 PM
That is a read-only property.

Maybe you could use the onload event for the image instead. That will fire when the image is successfully loaded.

BTW, if the image doesn't exist, it's "complete" will still say "true", but you will not get an onload event.