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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect a webpage

Status
Not open for further replies.

andycape

Programmer
Aug 22, 2003
177
ZA
Anyone aware of the javascript you would use to make a redirect page?

ie : Redirect the user to a different page and maybe have one of this messages
"You will be redirected to XXX in 5 seconds, or else click on this link"

Obviously this is just an html file , and I guess you would include the javascript in the head?

Thanx...
 
Try this:

Code:
<html>
<head>
<script type="text/javascript">
<!--
	function startTimer() {
		setTimeout('document.location = \'[URL unfurl="true"]http://www.google.co.uk/\'',[/URL] 5000);
	}
//-->
</script>
</head>
<body onload="startTimer();">
	Please wait 5 seconds to be redirected, or click <a href="[URL unfurl="true"]http://www.google.co.uk/">here</a>[/URL]
</body>
</html>

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top