habib
03-10-2003, 11:26 AM
Hello PPl,
I want to use radio buttons on a mini questionnaire, the user has to check "yes" for all 3 questions in order for them to go to the next page.
Here is my code that I have done so far.... (but I'm not sure how to check the radio buttons have been selected and checked value for all of them are "yes")
<form name="confirmed" action="" method="post">
<li> Q1 Is hair color black? </li>
Yes<input type="radio" name="haircolor" value="1">
No<input type="radio" name="haircolor" value="0" checked>
<li> Q1 Is eye color brown? </li>
Yes<input type="radio" name="eyecolor" value="1">
No<input type="radio" name="eyecolor" value="0" checked>
<li> Q1 Is skin color brown? </li>
Yes<input type="radio" name="skincolor" value="1">
No<input type="radio" name="skincolor" value="0" checked>
<img src="images/submit.gif" border="0" alt="Continue" onClick="next();">
<script>
function next() {
with(document.confirmed) {
location.href="page2.htm" }
}
</script>
</form>
I want to use radio buttons on a mini questionnaire, the user has to check "yes" for all 3 questions in order for them to go to the next page.
Here is my code that I have done so far.... (but I'm not sure how to check the radio buttons have been selected and checked value for all of them are "yes")
<form name="confirmed" action="" method="post">
<li> Q1 Is hair color black? </li>
Yes<input type="radio" name="haircolor" value="1">
No<input type="radio" name="haircolor" value="0" checked>
<li> Q1 Is eye color brown? </li>
Yes<input type="radio" name="eyecolor" value="1">
No<input type="radio" name="eyecolor" value="0" checked>
<li> Q1 Is skin color brown? </li>
Yes<input type="radio" name="skincolor" value="1">
No<input type="radio" name="skincolor" value="0" checked>
<img src="images/submit.gif" border="0" alt="Continue" onClick="next();">
<script>
function next() {
with(document.confirmed) {
location.href="page2.htm" }
}
</script>
</form>