Redirect based on cookie value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ldixon789@yahoo.co.uk

    #1

    Redirect based on cookie value

    I'm trying to either redirect users to a new page or giving them an
    alert message depending on the value of a cookie. I'm very new to
    Javascript and would appreciate any advice on making the following
    statement work (this is more a wish list of what I would like it to do
    than workable code!)

    function CookieRedirect () {

    var favorite = GetCookie('numb er');

    if (favorite <= "300") {
    alert('incorrec t');
    else
    ("<a href="page2.htm >")
    }

    Thanks for any help.

    Laura
  • Thomas 'PointedEars' Lahn

    #2
    Re: Redirect based on cookie value

    ldixon789@yahoo .co.uk schrieb:[color=blue]
    > I'm trying to either redirect users to a new page or giving them an
    > alert message depending on the value of a cookie. I'm very new to
    > Javascript and would appreciate any advice on making the following
    > statement work (this is more a wish list of what I would like it to do
    > than workable code!)[/color]

    <http://devedge.netscap e.com/library/manuals/2000/javascript/1.3/reference/document.html#1 193577>
    <http://devedge.netscap e.com/library/manuals/2000/javascript/1.5/reference/string.html#119 4452>
    <http://devedge.netscap e.com/library/manuals/2000/javascript/1.5/reference/toplev.html#106 4173>
    <http://devedge.netscap e.com/library/manuals/2000/javascript/1.3/reference/location.html>


    HTH

    PointedEars

    Comment

    Working...