Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%
' we need a little UDF in order to write the word
' "selected" in the correct option
function Selected(x,y)
if Cint(x) = Cint(y) then Selected =" selected "
end function
' get the selected option from the previous form
dim cOption
cOption = Request.Form("fSelect")
%>
<form action=form1.asp method=post>
<select name=fSelect OnChange="submit();">
<%
for i = 1 to 3
Response.Write "<option " & i &_
Selected(i, cOption) &_
" value=" & i & ">T" & i
next
%>
</select>
</form>
<form action=form2.asp method=post>
<%
' based on the selected option put 1...3 checkboxes
' on screen
if cOption <> "" then
for i = 1 to Cint(cOption)
Response.Write "<input type=checkbox name=fCheck" &_
i & "><br>"
next
Response.Write "<br><input type=submit>"
end if
%>
</form>
change:
<input type="hidden" name"frmSubj" value="<%formOption)%>
into
<input type="hidden" name"frmSubj" value="<%= formOption %>
sOption=Request.form("formOption")
will not work because the SELECT is called frmOption:
<select name="frmOption" OnChange="submit();">