homepage Welcome to WebmasterWorld Guest from 54.226.191.80
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Redirecting Scripts
auto redirect from a to b?
KG2RG




msg:564439
 10:32 pm on Sep 25, 2002 (gmt 0)

Any one know how I can have a visitor automatically redirected to another url as they enter a page. So when the visitor enters page1.hml, as soon as the page loads, a message is displayed saying: please stand by... Redirecting..." I need a free java or perl script? Or another trick?

 

aspr1n




msg:564440
 10:48 pm on Sep 25, 2002 (gmt 0)

Either:

Javascript called from "onload"

function ReDirect() {
var i, args=ReDirect.arguments; document.returnValue = false;
for (i=0; i<(args.length-1); i+=2)
eval(args[i]+".location='"+args[i+1]+"'");
}

<body onload="Redirect('YourFrame','YourNewURL');return document.returnValue">
</body>

Or:

<meta http-equiv="Refresh" content="TimeDelay;URL=YourNewUrl" />

asp

KG2RG




msg:564441
 11:16 pm on Sep 25, 2002 (gmt 0)

Thanks, but they don't seem to work

aspr1n




msg:564442
 11:55 pm on Sep 25, 2002 (gmt 0)

Following works fine for me:

<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<meta http-equiv="refresh" content="5;URL=http://www.google.com" />
</body>
</html>

asp

KG2RG




msg:564443
 12:05 am on Sep 26, 2002 (gmt 0)

OK, I got it!

The 1st one you gave me did not work for me.
<meta http-equiv="Refresh" content="TimeDelay;URL=http://www.google.com" />

I found this and it worked.
<META HTTP-EQUIV="Refresh" CONTENT="3; url=http://www.google.com">

This other one you gave me works and looks the same.
<meta http-equiv="refresh" content="5;URL=http://www.google.com" />

What is the #3 or #5 for in CONTENT="3? Is it the value of delay time? I'm 99.9% sure it is.

Once again, thank you very much for the help!

jatar_k




msg:564444
 12:07 am on Sep 26, 2002 (gmt 0)

it is the number of seconds until it redirects.

<meta http-equiv="Refresh" content="TimeDelay;URL=YourNewUrl" />

You have to replace TimeDelay with a number and then YourNewUrl with the url you want to redirect to.

KG2RG




msg:564445
 2:27 am on Sep 26, 2002 (gmt 0)

Thanks guys! I got it and I'm in business now. I can always count on the webmasters world members for help. Special thanks to the site as well.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved