Forum Moderators: open
<!--Input type for entering subject ID and subject name-->
<form name="form1" ID="frm1" method="post" action="onchange.asp">
<input type="hidden" name"frmSubj" value="<%=formOption%>">
<!--Class radio button-->
<table align=center border=1>
<tr>
<td>
<% If Not clsRS.EOF Then
clsRS.MoveFirst %>
<!-- Continue until we get to the end of the recordset.-->
<%Do While Not clsRS.EOF%>
<input type="radio" name='class' value="<%=clsRS("clsID")%>">
<%=clsRS("clsID")%>
<%'Get next record
clsRS.MoveNext
Loop
End if %>
</td>
</tr>
</table>
<!--Select Option-->
<table align=center border=1>
<tr>
<td colspan=2>
<%
If Not frmRS.EOF Then
frmRS.MoveFirst
%>
<select name="frmOption" OnChange="submit();">
<%
' Continue until we get to the end of the recordset.
Do While Not frmRS.EOF
%>
<!--
<input type="radio" name='form' value="<%=frmRS("frmID")%>-->
<%'=frmRS("frmID")%>
%>
<option value="<%=frmRS("frmID")%>">
<%=frmRS("frmID")%></option>
<%
'Get next record
frmRS.MoveNext
Loop
%>
</select>
</TD>
</TR>
<!--form action=form2.asp method=post-->
<%
sOption=Request.form("formOption")
Set subjRS=Server.CreateObject("ADODB.Recordset")
sql="SELECT subjID FROM TblForm_Subj WHERE frmID='"&sOption&"'"
Set subjRS=wCON.Execute(sql)
If sOption <>"" then
'Response.Write(sql)
If Not subjRS.EOF Then
subjRS.MoveFirst %>
<!-- Continue until to the end of the recordset.-->
<%Do While Not subjRS.EOF%>
<input type="checkbox" name='subject' value="<%=subjRS("subjID")%>">
<%=subjRS("subjID")%>
<%'Get next record
subjRS.MoveNext
Loop
Response.Write"<input type=submit>"
End if
End If%>
<%
'subjRS.Close
'Set subjRS=nothing %>
<%
'--Close all connection
clsRS.Close
Set clsRS = Nothing
wCON.Close
Set wCON = Nothing
End If
%>
<tr>
<td align=right><INPUT TYPE="submit" VALUE="Send" ID=submit1 NAME=submit1></td>
<td><INPUT TYPE="reset" VALUE="Reset" ID=reset1 NAME=reset1></td>
</tr>
</table>
</form>
</body>
</html>
I don't quiet understand what you are trying to do, but if you need to change a form element after changing another one, you'll need JavaScript to do it client side, or you'll need to refresh the page and do it server side.
Plus, this part of your code is incorrect:
<%'=frmRS("frmID")%>
%>
You have two "%>" in a row - it should be:
<%'=frmRS("frmID")%>