sydhussain2010
Programmer
i want to validate against the dropdown fields usrchoices which repeat depends upon the data recordsets....Thanks in advance
<script language="JavaScript"><!--
function validating(validate) {
if (form.usrchoices.selectedIndex == 0) {
alert('Please select all Questions');
document.getElementById("validate").reset();
return false;
}
return true;
}
//--></script>
<form action="submitsurvey.asp" method="post" name="validate" id="validate" onSubmit="return validating()">
<% Do while Recordset_questions.EOF %>
<select name="usrchoices" id="usrchoices">
<option value="" selected>Select Choices</option>
<option value="Y">Yes</option>
<option value="N">No</option>
<option value="IDK">I Dont know</option>
</select>
<%Loop%>
</form>
<script language="JavaScript"><!--
function validating(validate) {
if (form.usrchoices.selectedIndex == 0) {
alert('Please select all Questions');
document.getElementById("validate").reset();
return false;
}
return true;
}
//--></script>
<form action="submitsurvey.asp" method="post" name="validate" id="validate" onSubmit="return validating()">
<% Do while Recordset_questions.EOF %>
<select name="usrchoices" id="usrchoices">
<option value="" selected>Select Choices</option>
<option value="Y">Yes</option>
<option value="N">No</option>
<option value="IDK">I Dont know</option>
</select>
<%Loop%>
</form>