Javascript and Cookies

R

Rodolo

Hi,
I use Javascript cookies in a web application
with a command like this

document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());

But it does not work in some cases that I dont understand

I wonder why this happens

Can anyone help me?

Alessandro
 
B

Bart Van der Donck

Rodolo said:
I use Javascript cookies in a web application
with a command like this

document.cookie = NameOfCookie + "=" + escape(value)
+ ((expiredays == null) ? "" : "; expires=" +
ExpireDate.toGMTString());

But it does not work in some cases that I dont understand

Here is a document that explains it step-by-step:

http://www.w3schools.com/js/js_cookies.asp

Hope this helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

retreive cookies 4
cookies in Javascript and ASP 1
same cookie to be used all over website 0
Cookies? 5
cookies in HTA 1
cookies 1
cookie problems 0
New To Javascript - Accessing Data 3

Members online

Forum statistics

Threads
474,160
Messages
2,570,890
Members
47,423
Latest member
henerygril

Latest Threads

Top