Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-25-2005, 08:23 PM   PM User | #1
dazappa
New Coder

 
Join Date: Dec 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
dazappa is an unknown quantity at this point
cookie help - i close browser and returns null

Ok, so I have my cookie script, and it can set and retrieve cookies just fine. But if I close my browser and reopen the page, the cookie returns null. To be sure it wasn't a coding mistake that I made, I went to a website where they also had a cookie example. The same thing happened. Can any one post some code that could solve this wierd problem? (I tested on both IE and firefox just to make sure).
dazappa is offline   Reply With Quote
Old 12-25-2005, 08:36 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Did you set an expiry date? Without an expiry date the cookie will be automatically deleted when the browser is closed.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 12-25-2005, 08:53 PM   PM User | #3
dazappa
New Coder

 
Join Date: Dec 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
dazappa is an unknown quantity at this point
Yes, I have an expiry date set. The page I used for my second test that *wasn't* part of my code is here
On this page they show their code, along with links at the very bottom that set the cookie and get the cookie. I still have the same problem of it returning null. I do have cookies enabled, if there are any other cookie options I can set in IE or firefox tell me please, but I don't understand.
dazappa is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 01:23 PM.


Advertisement
Log in to turn off these ads.