View Full Version : Forward user when page finishes loading

07-11-2007, 07: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, 08: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'

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

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