idsanjeev Posted May 15, 2008 Share Posted May 15, 2008 I have porblems in selecting select box when select box selected and reloaded form it has been forget option selected . so my problems to if select option is selected then after reloaded how can show selected value in to select boxmy code is like <select Id="dept" Name="DEPT" onChange="this.form.submit();"> <option value="ALL">[Select Department]</option> <% while not rs3.eof %> <option value=<%=rs3("deptcode")%> ><%=rs3("deptname")%></option> </option> <% rs3.movenext wend rs3.close session("Dept")=Request.Form("dept") %> </select> Link to comment Share on other sites More sharing options...
justsomeguy Posted May 15, 2008 Share Posted May 15, 2008 If the page just gets refreshed without being submitted then you can't know what they chose. If you're trying to submit the form and re-display it then you can get what they selected from Response.Form("DEPT") and compare it with the value of each option to see if you write selected="selected" for that option. Link to comment Share on other sites More sharing options...
idsanjeev Posted May 17, 2008 Author Share Posted May 17, 2008 Thanks Now it work for me If the page just gets refreshed without being submitted then you can't know what they chose. If you're trying to submit the form and re-display it then you can get what they selected from Response.Form("DEPT") and compare it with the value of each option to see if you write selected="selected" for that option. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.