Instead of assigning a variable, assign to a session variable, then in the
forms action refer to the session variable ("=<%Session("var")%>"), but then you must use
VBScript instead of Javascript and also server-side not client-side.
OR
Instead of an "action", do a "onsubmit=func()" and call your javascript
function to redirect the window to another page (window.location.href
URL). Must use a type="submit" button.
OR if you are using a button (not submit), then use the "onclick=func()"
to call your function to redirect the web page.
hope this helps.
dw