I need to have two values passed to the DB when a user selects an option from a dynamic drop down eg a school name and its ID. I can get the school name from:
<select name="School" class="CSselectRed">
<%
While (NOT rsSchools.EOF)
%>
<option value="<%=(rsSchools.Fields.Item("SchoolName"
.Value)%>" ><%=(rsSchools.Fields.Item("SchoolName"
.Value)%></option>
<%
rsSchools.MoveNext()
Wend
If (rsSchools.CursorType > 0) Then
rsSchools.MoveFirst
Else
rsSchools.Requery
End If
%>
But how can I pass the relevant school's ID to a hidden form field when the option is selected (which is the way I think it can be done)?
TIA
Struth
<select name="School" class="CSselectRed">
<%
While (NOT rsSchools.EOF)
%>
<option value="<%=(rsSchools.Fields.Item("SchoolName"
<%
rsSchools.MoveNext()
Wend
If (rsSchools.CursorType > 0) Then
rsSchools.MoveFirst
Else
rsSchools.Requery
End If
%>
But how can I pass the relevant school's ID to a hidden form field when the option is selected (which is the way I think it can be done)?
TIA
Struth