Click to See Complete Forum and Search --> : New to cookies


Lizo
05-22-2003, 05:45 PM
Hi all,

To begin with ill let you all know that I know absolutely nothing about cookies. :o

Firstly Id like to know how easy it is to edit cookies in JS. Does the whole cookie have to be re-wrote or can you just add stuff to the end of it? What I eventually want to be able to do is allow the user to click a button called save and it will save a variable from the JS to the cookie, possibly allowing them to add some form of name. I also want the user to be able to save multiple values. Is it possible to just save the next value to the end of the cookie or would I have to read in the cookie and then write it again including the new value?

Secondly on retrieving the values, is this just done by using the substr() substring() methods. How easy would it be to then take the loaded values from the cookie and display them all in a html select box?

Im going to stop now, Ive got way too many questions. :o

Thanks all.

Vladdy
05-22-2003, 05:53 PM
I wrote this to make working with cookies as easy as it can be: www.vladdy.net/webdesign/cookies.html

Lizo
05-22-2003, 06:05 PM
Ok I understand things a little more now.