dictionary/hash cookies with javascript

Status
Not open for further replies.

skain

Ars Scholae Palatinae
1,451
Hi all.

Another programmer at my job here was just asking me whether it's possible to do something in Javascript similar to the cookie dictionary concept in VBScript.

In an ASP app, I can do the following:

Response.Cookies("mycookie")("type1") = "sugar"
Response.Cookies("mycookie")("type2") = "chocolate chip"

This basically makes the cookie ("mycookie") act like a dictionary (or hash for those unfamiliar with VBScript.) Both I and the other senior programmer here seem to remember seeing how to do this in Javascript somewhere, but we can't find a reference.

Any ideas?

Thanks.
 
Status
Not open for further replies.