I'm doing a quiz. I have a problem to compare the value that had been check by user with the actual result. <BR><BR>Here is some of my code in the form<BR><form name="myQuiz" action="" method"post"><BR><tr><td> My first question</td></tr><BR><tr><td><inpu t type="radio" name="q1" value="a"></td><BR><td>Possible answer a.</td></tr><BR><tr><td><inpu t type="radio" name="q1" value="b"></td><BR><td>Possible answer b.</td></tr><BR><tr><td><inpu t type="radio" name="q1" value="c"></td><BR><td>Possible answer c</td></tr><BR><BR>and at the end of the form I put a button that when pressed it will call onSubmit event using javascript.<BR><td><input type=button value=Submit name=button onclick=onSubmit();></td><BR><BR>the onSubmit will compare the actual result with the answer given by user.<BR><BR>function onSubmit()<BR>{<BR>var correct=0;<BR>for (i=1;i <= totalquestions; i++)<BR>{<BR> if (document.myQuiz.q1 == correctchoices[i])<BR> correct++;<BR>}<BR>alert("Your correct answer is" + correct );<BR>}<BR><BR>//the correctchoices is the actual answer and it is like this;<BR>var correctchoices=new Array()<BR>correctchoices[1]='c'<BR>correctchoices[2]='a'<BR><BR>My problem is, I always got zero correct answer even I already click the right answer. Can someone help me how to compare between the answer given by user and the actual answer. Looks like my onSubmit function is not working.<BR><BR>Thanks in advance.