I'm not sure what you mean by 'a javascript condition', but from javascript it's possible, yes.
Quoting a reply from Bruce sometime in 2012:
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
So - be careful (with the chair)
Update: the thread is named ?Reading hidden Field values? and was started by Devan on 21. May 2012.
Peter