onchange drop down box and saving input values

admin

Administrator
Staff member
I have drop down boxes that are dymanical display based based on the onchange.

The problem I'm having that I have an input box before the drop down box. Once the drop down changes, the screen is refreshed and the value of the input is no longer there.

I've tried displaying the input box from a request.form with no luck.

I think the problem is in my JavaScript but I'm not sure.

Any help would be appreciated.

Thanks
M.

function MM_jumpMenu(selObj,restore){ //v3.0
eval("location='"+selObj.options[selObj.selectedIndex].value+"'");

if (restore) selObj.selectedIndex=0;
}

<input type="text" name="txtRequestorName" style="FONT:x-small Verdana" value=http://www.webdeveloper.com/forum/archive/index.php/"<%response.write Request.form("txtRequestorName")"size="25">

<select name="cboDivision" style="font:x-small verdana" onChange="MM_jumpMenu(this,0)">

<option value="worksheet.asp?WTC=<%=Request.QueryString("WTC")%>">Choose A Division</option>

<%'This displays all the dropdown box of Division that was created in the header.

Do While Not RSDivision.EOF 'Loop through the Division

If Request.QueryString("Division") = RSDivision("Region") Then 'Checks the new value against the selected value

'If there is a match, the Division is selected%>

<option value=http://www.webdeveloper.com/forum/archive/index.php/"worksheet.asp?WTC=<%=Request.QueryString("WTC")%>&Division=<%=RSDivision("Region")%>" selected><%=RSDivision("Region")%></option>
<%

Else'If there is no match, then the current Division is not selected
%>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"worksheet.asp?WTC=<%=Request.QueryString("WTC")%>&Division=<%=RSDivision("Region")%></option>

<%End If

RSDivision.MoveNext'Move to the next Division

Loop 'Continue while records exist%>

</select>
 
Back
Top