Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i pass the value of a select box to.....

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I have this form below that passes some values to an asp form collection page. I do not have problem passing the values of the <input> tags to the page, I just do,

rac_last= request.form(&quot;rac_last&quot;).....

But I'm having a problem passing the value of the <select> tag. When I do dep_code = request.form(&quot;dep_code&quot;), no value is being passed.

Any help will be greatly appreciated.



<body><form name=&quot;racform&quot; action=&quot;add_action.asp?action=update_rac&quot; method=&quot;post&quot; onsubmit=&quot;return verifyrac()&quot;>
<center>
<table>
<tr><td>Last Name:<input type=text name=&quot;rac_last&quot; value=&quot;<%=staffset(&quot;rac_last&quot;)%>&quot;></td>
<tr><td>First Name:<input type=text name=&quot;rac_first&quot; value=&quot;<%=staffset(&quot;rac_first&quot;)%>&quot;></td>
<tr><td>Title:<input type=text name=&quot;rac_title&quot; value=&quot;<%=staffset(&quot;rac_title&quot;)%>&quot;></td>
<tr><td>Department:<select name=&quot;dep_code&quot;>
<option value=&quot;<%=staffset(&quot;rac_dep_code&quot;)%>&quot; selected><%=staffset(&quot;dep_name&quot;)%></option>
<%
strtext=&quot;select * from rac_dep&quot;
set deptset=hertzDB.Execute(strtext)
deptset.movefirst
while not deptset.eof
%>
<option value=&quot;<%=deptset(&quot;dep_code&quot;)%>&quot;><%=deptset(&quot;dep_name&quot;)%>
</option>
<%
deptset.movenext
wend
%>
</select>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top