Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Redirect based on cookie value

Reply
Thread Tools

Redirect based on cookie value

 
 
ldixon789@yahoo.co.uk
Guest
Posts: n/a
 
      06-15-2004
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('number');

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

Thanks for any help.

Laura
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      06-15-2004
schrieb:
> 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!)


<http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/document.html#1193577>
<http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/string.html#1194452>
<http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/toplev.html#1064173>
<http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/location.html>


HTH

PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP : how can directly get the value of a specified cookie namewithout using a loop FROM the header.cookie ? stunaz Java 2 12-24-2010 03:08 PM
Cookie and Session Cookie Questions. Shapper ASP .Net 1 04-27-2005 11:20 AM
Session cookie? Browser instance cookie? Ben ASP .Net 3 06-03-2004 03:41 AM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
cookie value is time value such as "11:33:44" terry Javascript 2 07-31-2003 07:23 PM



Advertisments