OrWolf
MIS
- Mar 19, 2001
- 291
I'm trying to redirect the user and validate data input into two drop-down boxes. However the two pieces of code don't seem work together.
This works to redirect, but doesn't validate that the user input anything into the drop-down boxes:
<form method="POST" name="SendMe2">
<p align="left"><select size="1" name="FacilityDD" tabindex="10">
<option selected>Select a Facility</option>
<%
Do While Not objRecordset.EOF
%>
<option VALUE="<%=objRecordset("Facility"%>">
<%=objRecordset("Facility"%></option>
<%
objRecordset.MoveNext
Loop ' keep the loop
%>
</select></p>
<p align="left"><select size="1" name="SurveyType" tabindex="20">
<option selected>Select a Survey Type</option>
<option value="RA_DSurveyDept.asp">Department</option>
<option value="RA_OSurveyOrg.asp">Organization</option>
</select></p><input type="button" value="Continue" name="Continue" tabindex="500"><input type="reset" value="Reset" name="B2" tabindex="510">
<SCRIPT FOR="Continue" EVENT="onClick" LANGUAGE="VBScript">
dim choice
choice = document.SendMe2.SurveyType.selectedindex
navigate document.SendMe2.SurveyType.options(choice).value
</SCRIPT>
</form>
This code does nothing when the user presses the continue button:
<form method="POST" name="SendMe2">
<p align="left"><!--webbot bot="Validation" S-Display-Name="Facility"
B-Value-Required="TRUE" B-Disallow-First-Item="TRUE" --><select size="1" name="FacilityDD" tabindex="10">
<option selected>Select a Facility</option>
<%
Do While Not objRecordset.EOF
%>
<option VALUE="<%=objRecordset("Facility"%>">
<%=objRecordset("Facility"%></option>
<%
objRecordset.MoveNext
Loop ' keep the loop
%>
</select></p>
<p align="left"><!--webbot bot="Validation" S-Display-Name="Survey Type"
B-Value-Required="TRUE" B-Disallow-First-Item="TRUE" --><select size="1" name="SurveyType" tabindex="20">
<option selected>Select a Survey Type</option>
<option value="RA_DSurveyDept.asp">Department</option>
<option value="RA_OSurveyOrg.asp">Organization</option>
</select></p><input type="button" value="Continue" name="Continue" tabindex="500"><input type="reset" value="Reset" name="B2" tabindex="510">
<SCRIPT FOR="Continue" EVENT="onClick" LANGUAGE="VBScript">
dim choice
choice = document.SendMe2.SurveyType.selectedindex
navigate document.SendMe2.SurveyType.options(choice).value
</SCRIPT>
</form>
Thanks for the help!
This works to redirect, but doesn't validate that the user input anything into the drop-down boxes:
<form method="POST" name="SendMe2">
<p align="left"><select size="1" name="FacilityDD" tabindex="10">
<option selected>Select a Facility</option>
<%
Do While Not objRecordset.EOF
%>
<option VALUE="<%=objRecordset("Facility"%>">
<%=objRecordset("Facility"%></option>
<%
objRecordset.MoveNext
Loop ' keep the loop
%>
</select></p>
<p align="left"><select size="1" name="SurveyType" tabindex="20">
<option selected>Select a Survey Type</option>
<option value="RA_DSurveyDept.asp">Department</option>
<option value="RA_OSurveyOrg.asp">Organization</option>
</select></p><input type="button" value="Continue" name="Continue" tabindex="500"><input type="reset" value="Reset" name="B2" tabindex="510">
<SCRIPT FOR="Continue" EVENT="onClick" LANGUAGE="VBScript">
dim choice
choice = document.SendMe2.SurveyType.selectedindex
navigate document.SendMe2.SurveyType.options(choice).value
</SCRIPT>
</form>
This code does nothing when the user presses the continue button:
<form method="POST" name="SendMe2">
<p align="left"><!--webbot bot="Validation" S-Display-Name="Facility"
B-Value-Required="TRUE" B-Disallow-First-Item="TRUE" --><select size="1" name="FacilityDD" tabindex="10">
<option selected>Select a Facility</option>
<%
Do While Not objRecordset.EOF
%>
<option VALUE="<%=objRecordset("Facility"%>">
<%=objRecordset("Facility"%></option>
<%
objRecordset.MoveNext
Loop ' keep the loop
%>
</select></p>
<p align="left"><!--webbot bot="Validation" S-Display-Name="Survey Type"
B-Value-Required="TRUE" B-Disallow-First-Item="TRUE" --><select size="1" name="SurveyType" tabindex="20">
<option selected>Select a Survey Type</option>
<option value="RA_DSurveyDept.asp">Department</option>
<option value="RA_OSurveyOrg.asp">Organization</option>
</select></p><input type="button" value="Continue" name="Continue" tabindex="500"><input type="reset" value="Reset" name="B2" tabindex="510">
<SCRIPT FOR="Continue" EVENT="onClick" LANGUAGE="VBScript">
dim choice
choice = document.SendMe2.SurveyType.selectedindex
navigate document.SendMe2.SurveyType.options(choice).value
</SCRIPT>
</form>
Thanks for the help!