PDA

View Full Version : Swap image on timer?



AmenKa
03-15-2008, 06:58 AM
Hi, I am wondering if there is a way to use javascript to swap an image on the page for another one as soon as the page is done loading. Any help and code examples would be much appreciated!

Thanks, Ka

Bob90
03-15-2008, 01:07 PM
Why?

If the page is loading, then the user may not be able to see the image. So if the image changes as soon as the page loads, the user may not see the change.:confused:

zaphod42
03-15-2008, 06:01 PM
once again, look at quirksmode.org at the compatibility tables. setTimer is what you are looking for, but like AmenKa already alluded to, there isn't a reliable way to ensure that any sort of loading happens in the proper order without using javascript to load all of the elements on the page when you want them to.

AmenKa
03-15-2008, 06:46 PM
I have managed to achieve the same effect using js to control the pages load