Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect snippet

Status
Not open for further replies.

iluvperl

Programmer
Joined
Jan 22, 2006
Messages
107
Can someone give me a javascript redirect snipped that has a timer of 5 seconds? I can't have it in the bodyload tag, it has to be a standalone snippet I can add anywhere in the body of my site.

Thanks!
 
Code:
<script type="text/javascript">
<!--
   window.onload = function() {
      setTimeout("location = '[URL unfurl="true"]http://www.google.co.uk/',[/URL] '', '');", 5000);
   }

//--></script>

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
That errors out for me.
 
Try this slight modification to that BRPS's script:
Code:
<script type="text/javascript">
<!--
window.onload = setTimeout("location.href = '[URL unfurl="true"]http://www.google.co.uk/'",[/URL] 5000);
//--></script>

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top