how do I redirect to a page after 5 seconds? ..
Please give me the entire code
redirect
Moderators: egami, macek, gesf
--
Erik
Erik
search the internet for javascript redirects or header redirects. PHP cannot do it.
with a header redirect put this within the <head>
<meta http-equiv="refresh" content="5;url=http://yourdomain.com">
with a header redirect put this within the <head>
<meta http-equiv="refresh" content="5;url=http://yourdomain.com">
-
- Last Samuray
- Posts: 824
- Joined: Sun Jun 02, 2002 3:09 am
Code: Select all
<script language="JavaScript">
<!--
t=1; function dorefresh() { u=new String("<?=$URL;?>");
ti=setTimeout("dorefresh();",5000); if (t>0) { t-=1; }
else { clearTimeout(ti); window.location=u.replace("#","&t="+parseInt(10000*Math.random())+"#"); }
} window.onLoad=dorefresh();
//--></script><noscript><meta http-equiv="Refresh" content="1; URL=<?=$URL;?>"></noscript>