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 07-28-2011, 03:00 PM   PM User | #1
tpeck
Regular Coder

 
tpeck's Avatar
 
Join Date: Oct 2002
Location: Sydney, Australia
Posts: 771
Thanks: 40
Thanked 5 Times in 4 Posts
tpeck is on a distinguished road
cookie path problem

Unfortunately, this isn't standard cookie stuff (I don't think).

I have a compiled .exe loader for a program which includes an .html page which records the input of a textbox to a cookie.

That much works OK. But reading it back isn't working.

It seems the path is:

~~local~~/C:/Users/Terry/AppData/Local/Temp/td9/FrontPage%20Webs/1001(FINAL)(v1.2)/loader/

i.e. a temp dir related to the directory from where the .exe file was created.

What I need is for the cookie to be available everywhere:

~~local~~/

Is anyone able to shed some light? Adding ";path=/"; isn't working.

I guess it's something to do with being compiled?
__________________
The difference between genius and stupidity is that genius has its limits. (Albert Einstein)
tpeck is offline   Reply With Quote
Old 07-28-2011, 04:20 PM   PM User | #2
tpeck
Regular Coder

 
tpeck's Avatar
 
Join Date: Oct 2002
Location: Sydney, Australia
Posts: 771
Thanks: 40
Thanked 5 Times in 4 Posts
tpeck is on a distinguished road
Fixed. It was a stupid syntax problem:

Code:
document.cookie = isName+"="+escape(isValue)+";expires="+expDate.toGMTString();+";path=/";
instead of...

Code:
document.cookie = isName+"="+escape(isValue)+";expires="+expDate.toGMTString()+";path=/";
The latter is correct.
__________________
The difference between genius and stupidity is that genius has its limits. (Albert Einstein)
tpeck 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:07 AM.


Advertisement
Log in to turn off these ads.