Chalo
07-09-2004, 06:21 PM
Hi there, just need help with validating radio buttons. I've look all over and can't find any answer even text books. Validating one radio button is no problem, however an array of them has been a nightmare. Got to validate one array of options through a loop but without success in getting to validating the rest once the radio is checked. Also trying to validate the rest of the questions seem far for me.
sample problem.
- 1.Question a. b. c. d.
- 2.Question a. b. c. d.
Code:
for (i=0; i<3; i++) {
if (document.form1.radio1[i].checked == false){
alert("Answer question 1");
else {return true}
Any help will be much appreciated.
Chalo
sample problem.
- 1.Question a. b. c. d.
- 2.Question a. b. c. d.
Code:
for (i=0; i<3; i++) {
if (document.form1.radio1[i].checked == false){
alert("Answer question 1");
else {return true}
Any help will be much appreciated.
Chalo