Results 1 to 5 of 5

Thread: redirection

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Posts
    150

    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

  2. #2
    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>

  3. #3
    scoutt
    Guest
    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()">

  4. #4
    Why onClick? Shouldn't it be onLoad?

  5. #5
    scoutt
    Guest
    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
  •  



Click Here to Expand Forum to Full Width