Click to See Complete Forum and Search --> : detect if image/page has loaded
daxiang28
01-08-2003, 03:15 PM
hi i was wondering how i can detect if a page had finished loading before a script runs? i'm using the following code, but it runs before the main image even loads. it's for an image slide show.
<SCRIPT LANGUAGE="JavaScript">
setTimeout("launch()",8000);
function launch(){
location.href = "nextpage.htm";
}
</SCRIPT>
thanks,
steve
Charles
01-08-2003, 03:36 PM
<img alt="[Bettie Page with a whip.]" onload="launch()" src="http://www.bettiepage.com/images/photos/whip/whip7_a.jpg">
daxiang28
01-14-2003, 12:03 AM
thanks charles.
how can i get the setTimeout to work with it? it seems to bypass it. i would like thei mage to load, wait 8 seconds, and then change to the next page.
thanks,
steve
I think that should do it:
<img alt="[Bettie Page with a whip.]" onload="setTimeout('launch()',8000)" src="http://www.bettiepage.com/images/photos/whip/whip7_a.jpg">
think that should do it:
<img alt="[Bettie Page with a whip.]" onload="setTimeout('launch()',8000)" src="http://www.bettiepage.com/images/photos/whip/whip7_a.jpg">
daxiang28
01-14-2003, 12:43 AM
works for me!!
thank you