|
-
Feb 20th, 2002, 11:41 AM
#1
Thread Starter
Addicted Member
redirection
Hi all,
Is there a Javascript command that does the same has
<code>response.redirect ("URL")</code>
Note:response.redirect ("URL") is in VBScript
Thanks
-
Feb 20th, 2002, 02:09 PM
#2
Member
Code:
window.location = ...;
PHP:
PHP Code:
header("Location: whereever.html");
If the page's only purpose is to redirect, then you can use a META tag with a REFRESH attribute. I think it goes something like:
Code:
<head>
.
.
.
<meta http-equiv="refresh; 0" content="whatever.html">
.
.
.
</head>
-
Feb 20th, 2002, 06:41 PM
#3
close Arien
Code:
<META HTTP-EQUIV="Refresh" Content="5;URL=page.html">
also that header("Location: whereever.html"); can also impliment a bunch of wrning messages that say header already sent if the person doesn't do it right.
but wouldn't javascript be
Code:
<head>
<SCRIPT LANGUAGE="JavaScript">
function redirectPage() {
window.location.href= youpage.html;
}
</script>
</head>
<body onload="redirectPage()">
-
Feb 27th, 2002, 05:08 PM
#4
Member
Why onClick? Shouldn't it be onLoad?
-
Feb 27th, 2002, 05:22 PM
#5
yes you are right. not sure how that got there.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|