Jump to content

select box selected


idsanjeev

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...