Is it possible to create and update a session variable in JavaScript? Just like in PHP as I start sessions and initialize session variable.
I\'m using some JavaScrip
There are a number of ways of recording state in Javascript - none of which are particularly great / cross-browser, but there you go.
You can set and get cookies - http://www.quirksmode.org/js/cookies.html
Window.name storage (sessionvars) - http://www.thomasfrank.se/sessionvars.html - this is a very cool hack, but probably not a great idea to use for anything important
HTML5 local storage - http://diveintohtml5.ep.io/storage.html
Server-side is probably the way to go here, but client-side you have a few options.