...

View Full Version : Forward user when page finishes loading



Crazydog
07-11-2007, 06:11 PM
I have a faux loading page to load all my images before the user visits the site, and I was wondering if there was a way for javascript to forward the user after the page that loads all the images finishes loading

Philip M
07-11-2007, 07:37 PM
Try this:-

Place this in the <body> tag:-

<body onload="timer=setTimeout('redirect()',2000)">

Place this script at the very end of your page (i.e just before the </body> tag):-

<script type = "text/javascript">
function redirect() {
window.location = 'http://www.yourURL.com'
}
</script>

Adjust the 2000 (= 2 seconds) delay to suit.

Crazydog
07-12-2007, 12:44 AM
Isn't that just a redirect script?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum