This question is asked a LOT. "How do I set a session variable equal to something that was just created in client-side script?" You CAN'T. Because ASP is processed on the server, and JavaScript isn't processed until AFTER the results of ASP have been passed to the client, the only way to send JavaScript variables to ASP is to invoke another ASP page (e.g. submit a form, client-side redirect, auto-post to a hidden frame, etc.). Makes sense too, since you can't USE the new session variable until you load another ASP page anyway.
Having said all that, there are workarounds. Several examples are given in
Article #2281