Hi Devan,
so there are 2 questions here I think.
a) how to get JavaScript to update session values and
b) how to store values incoming from a form in the session queue.
I suspect you only need one, not both. First the answer to (b) though, since it's likely to be the one you don't use;
In the form, Validaterecord embed;
p_web.StoreValue('whatever')
where 'whatever' is the name of the (hidden) field being submitted.
however I suspect your hidden value thing is a kludge to get data from the browser? If so a simpler approach, in your JavaScript is just to call
SetSessionValue(name,value);
in JavaScript. (be aware, it's case sensitive.)
That JavaScript function (with the familiar name) will send an asynchronous packet to the server containing the name, and value, and the server will automatically move that into the session queue for you.
please don't hurt yourself falling off the chair...
Cheers
Bruce