Reload/Redirect to another page

This example is setup to redirect to another page in 2 seconds. When a page contains this javascript, it will be redirected to another page that you specify in the "window.location=". You can change the number of refresh seconds by changing the "move()',2000 to the number of seconds you'd like.

Example:

1000 = 1 second
3000 = 3 seconds


Place this code between the <head> and </head> tags

<script language="JavaScript">
<!--hide from old browsers
var time = null
function move() {
window.location = 'http://www.yourdomain.com'
}
//-->
</script>


Place this code in your <body> tag

onload="timer=setTimeout('move()',2000)">
<p>This page is setup to redirect to another page in 2 seconds.



Or simply,
just put this between your <HEAD> tags:

<META HTTP-EQUIV="refresh" content="2;URL=http://www.website.com/newpage.htm">

(2 in "content="2" reflect the number of seconds you want it to wait before redirecting.
Set to 0 (zero) if you want the redirect to happen immediately!)


Free JavaScripts provided
by Winfolinx.com

Back