JavaScript Simple Quiz help needed??
Have been at this quiz for ages now and just can't get it to work on my webpage. Can anyone spot the error?

The HTML:


    <body>
    <div id="content1">
	<div class="position">
    	<div class="form">
    		<h3>Quiz</h3>
            
     <form name="myForm">
 
     Question 1: Which of these is a letter?<br>
     <input type="radio" name="q1" value="correct">A<br>
     <input type="radio" name="q1">1<br>
     <input type="radio" name="q1">#<br>
     <input type="radio" name="q1">None of the Above<br>
     <br>
     Question 2: Which of these is a number?<br>
    <input type="radio" name="q2">A<br>
    <input type="radio" name="q2" value="correct">1<br>
    <input type="radio" name="q2">#<br>
    <input type="radio" name="q2">None of the Above<br>
    <br>

   etc...

 
   <input name="button" type="Submit" onClick="onclick=return checkAnswers()" />

   </form>
        </div>
     </div>
   </div>
   </body>





     The JS:

     <head>
     <script language="JavaScript">
     //put all the question sets into this array
      var allQuestions = new Array(document.myForm.q1,
                            document.myForm.q2,
                            document.myForm.q3,
                            document.myForm.q4);

     //redirects if 75% or greater, returns false otherwise
     function checkAnswers(){
    var totalScore = 0; //initialize to 0

    //go through each question set
    for (var i in allQuestions) {
    var temp = allQuestions[i];

    //go through each radio button in the current question set
    for (var j = 0; j < temp.length; j++) {

     //if the correct one is chosen then add 1 to total score
     if (temp[j].value == "correct" && temp[j].checked == true) {
       totalScore++;
        }
      }
    }

    //if the total percentage is more than 75%
    if ((totalScore/allQuestions.length) >= .75) {

    //alert and move on
    alert("Congratulations! Your score of " + totalScore +
         " out of " + allQuestions.length + " is good enough to proceed!");


     else{
   
    //otherwise alert and return false
    alert("You must get at least 75% correct to move on!");
    return false;
     }
     }
    </script>

    </head>

JavaScript Simple Quiz help needed??
===

Have been at this quiz for ages now and just can't get it to work on my webpage. Can anyone spot the error?

The HTML:


    <body>
    <div id="content1">
	<div class="position">
    	<div class="form">
    		<h3>Quiz</h3>
            
     <form name="myForm">
 
     Question 1: Which of these is a letter?<br>
     <input type="radio" name="q1" value="correct">A<br>
     <input type="radio" name="q1">1<br>
     <input type="radio" name="q1">#<br>
     <input type="radio" name="q1">None of the Above<br>
     <br>
     Question 2: Which of these is a number?<br>
    <input type="radio" name="q2">A<br>
    <input type="radio" name="q2" value="correct">1<br>
    <input type="radio" name="q2">#<br>
    <input type="radio" name="q2">None of the Above<br>
    <br>

   etc...

 
   <input name="button" type="Submit" onClick="onclick=return checkAnswers()" />

   </form>
        </div>
     </div>
   </div>
   </body>





     The JS:

     <head>
     <script language="JavaScript">
     //put all the question sets into this array
      var allQuestions = new Array(document.myForm.q1,
                            document.myForm.q2,
                            document.myForm.q3,
                            document.myForm.q4);

     //redirects if 75% or greater, returns false otherwise
     function checkAnswers(){
    var totalScore = 0; //initialize to 0

    //go through each question set
    for (var i in allQuestions) {
    var temp = allQuestions[i];

    //go through each radio button in the current question set
    for (var j = 0; j < temp.length; j++) {

     //if the correct one is chosen then add 1 to total score
     if (temp[j].value == "correct" && temp[j].checked == true) {
       totalScore++;
        }
      }
    }

    //if the total percentage is more than 75%
    if ((totalScore/allQuestions.length) >= .75) {

    //alert and move on
    alert("Congratulations! Your score of " + totalScore +
         " out of " + allQuestions.length + " is good enough to proceed!");


     else{
   
    //otherwise alert and return false
    alert("You must get at least 75% correct to move on!");
    return false;
     }
     }
    </script>

    </head>
