View Full Version : ASP within JS

01-11-2003, 11:27 AM
I would search the forum but it wouldn't let me search for asp, anyho, I have this function.

function MM_jumpMenu(targ,selObj,restore){ //v3.0

if (restore) selObj.selectedIndex=0;

and i would like to set an asp session variable in this, this is normally done by using <% session("User1")=variable%>, the thing is, i want to set that variable to selObj.options[selObj.selectedIndex].value, I have never mixed asp/js before so am unaware of any pitfalls, I still want the page to do the redirect but set the variable first.

01-11-2003, 05:51 PM
You can't set the variable until you redirect (since javascript is client-side, and ASP is server-side)... then on the server-side you can get the user value from the querystring... i.e. User=whatever.

Please don't cross-post...