URL Redirect

xtoor

Member
Joined
Aug 27, 2009
Messages
17
Reaction score
0
Hi

I need help with the following please:

I need to create a link that will load an aspx page with a count-down message dialog, then redirect the user after a few seconds to another link.
 
You can use the following meta tag to do that:
eg.
Code:
<meta http-equiv="refresh" content="10;url=http://website-to-redirect-to-here/">
 
HTML:
<html>
<head>
</head>
<body>
<div id="countdown"></div>
<script>

function countdown(secs)
{
	if(secs>0)
	{
		document.getElementById("countdown").innerHTML = secs;
		setTimeout(function(){countdown(secs-1)}, 1000);
	}
	else
	{
		window.location = "http://www.google.com/";		
	}
}
countdown(10);
</script>
<body>
</body>
</html>
 
Top
Sign up to the MyBroadband newsletter
X