bim269
03-19-2004, 04:55 AM
i am doing a question and answer site, now i have four radio buttons to a queation and each question comes out on a page.
i want to check for
1. if the user did not choose any of the option
2. if the correct answer is choosen to display msg "correct answer"
3. if the correct answer is not choosen, to display msg "incorrect answer,see Tip for correct answer"
this is the code i wrote to check if the user has chosen an answer but it is not working as expected
<script language='javascript'>
function checkForm(Form1){
if (!Form1.question[1].checked) {
var choice = confirm("Do you want to choose an answer?");
if (choice) {
return false;
}else {
myForm.action = "Quest1s.html";
}
}
}
</script>
pls i need help urgently
i want to check for
1. if the user did not choose any of the option
2. if the correct answer is choosen to display msg "correct answer"
3. if the correct answer is not choosen, to display msg "incorrect answer,see Tip for correct answer"
this is the code i wrote to check if the user has chosen an answer but it is not working as expected
<script language='javascript'>
function checkForm(Form1){
if (!Form1.question[1].checked) {
var choice = confirm("Do you want to choose an answer?");
if (choice) {
return false;
}else {
myForm.action = "Quest1s.html";
}
}
}
</script>
pls i need help urgently