How Do I Redirect The Url Automaticly?

liunx

Guest
I have asked this question before and the responce didnt work, so here it is again. I have an intro page to my web site. I would like it to redirect to the home page automaticly. Here is the code I was told to use that doesnt work. what is wrong with it?<br />
<br />
<meta http-equiv="refresh" content="8; url="frameset.html"><!--content--><meta http-equiv="refresh" content="8; url="frameset.html"> <br />
<br />
the problem is in the extra quote i underlined in the code you posted...<br />
<br />
try this:<br />
<br />
<html><br />
<head><br />
<meta http-equiv="refresh" content="8; url=frameset.html"><br />
</head><br />
<body><br />
<br />
I know it looks wierd and wrong without the url inside of quotes but that's how they set up the meta tag to work...<br />
<br />
if you prefer, you can put the url inside of single quotes:<br />
<br />
<html><br />
<head><br />
<meta http-equiv="refresh" content="8; url='frameset.html'"><br />
</head><br />
<body><br />
<br />
<br />
btw, remember that the meta tag will not do anything until the entire page is loaded... Then it'll start waiting the specified number of seconds before it loads the specified url...<!--content-->you could also use this code <body><br />
<form name="redirect"><br />
<center><br />
<font face="Arial"><b>You will be redirected to the script in<br><br><br />
<form><br />
<input type="text" size="3" name="redirect2"><br />
</form><br />
seconds</b></font><br />
</center> <br />
<br />
<script><br />
<br />
var targetURL="INSERT YOUR PAGE HERE"<br />
var countdownfrom=5<br />
<br />
<br />
var currentsecond=document.redirect.redirect2.value=countdownfrom+1<br />
function countredirect(){<br />
if (currentsecond!=1){<br />
currentsecond-=1<br />
document.redirect.redirect2.value=currentsecond<br />
}<br />
else{<br />
window.location=targetURL<br />
return<br />
}<br />
setTimeout("countredirect()",1000)<br />
}<br />
<br />
countredirect()<br />
//--><br />
</script><br />
</body><br />
<br />
also with the "var countdownfrom=5" you can change the number of seconds until the re-direct takes place - you will have a count down on the screen<br />
<br />
Joe<!--content-->Provide a plain text "we have moved" message and a normal clickable link, for those browsers that cannot follow meta redirects, or have javascript switched off, and for search engne spiders to follow as these also do not understand these methods.<!--content-->
 
Back
Top