LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-11-2005, 07:58 AM   #1
master splinter
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
Javascript Cookie help


Hi there.

I need some help with cookies. What I need to do is be able to set 2 cookies from the one script.

When the user comes to a gateway page they have 2 links they can click, each going to a separate location. When they click the link they will be hit with a regulatory page (different for each link), they will have to click "I Confirm", set the cookie, and enter the site. The next time they come back to the gateway, click the same link, they sould enter straight in, not be hit with the " I Confirm" again. The cookie should expire after 30 days, and they will have to do the process again.

In brief - one page - 2 links - fire up 2 separate pages and set 2 separate cookies...

Can this be done?

Thanks in advance!!!

MS
 
Old 05-11-2005, 01:47 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Is there a reason you are using javascript? It is usually easier and safer to set a cookie in the response headers of the next page.
 
Old 05-12-2005, 05:37 AM   #3
master splinter
LQ Newbie
 
Registered: May 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Hi Dave,

Thanks for yor help. I got it sorted!

MS
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fortune cookie :) Tinkster General 16 05-24-2005 08:26 AM
LQ cookie not used this time??? itsjustme LQ Suggestions & Feedback 3 11-19-2004 10:29 AM
mmmm cookie nny0000 Slackware 3 01-11-2004 03:17 AM
Cookie Problem in IE Doovie Programming 0 07-08-2003 08:47 AM
Lost my cookie crabboy LQ Suggestions & Feedback 2 06-12-2001 02:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration