- Forums
- Tutorial and Guides
- Javascipt Redirect To Another Site With Timer
This Page Contains information about Javascipt Redirect To Another Site With Timer By Webune in category Tutorial and Guides with 1 Replies. [675], Last Updated: Mon Jun 24, 2024
Webune
Tue Apr 22, 2008
1 Comments
419 Visits
ok, sometimes you have to change your website and when you install a new script or a new application on your website, the url doesn't always stay the same, but you dont want to loose all those customer by showing them an 404 error on their browser, istead, you want to redirec them to your new site, well, you can do this with javascript. this example will show your visitors a message and in 5000 milliseconds it will time out and send them to another site.
<html>
<head>
<title>Webune Redirect</title>
<script type="text/javascript">
<!--
function delayer(){
window.location = "http://www.webune.com"
}
//-->
</script>
</head>
<body onLoad="setTimeout('delayer()', 5000)">
<h2 >Your will be redirected.... </h2>
<p>We are sorry, this page has moved to another location. please wait while you are redirected to the new website</p>
<p><a href="http://www.webune.com">Webune.com </a></p>
</body>
</html>
so just copy and paste the code above to your notepad and save it as webune-timer.html then open it with your browser and you will see it in action.. its cool.
try it
https://www.webune.com/forums/javascipt-redirect-to-another-site-with-timer.html