title: Multiple quiz with checkboxes - multiple options
body: <p>I have the following HTML:</p>
  
  <pre><code>&lt;fieldset id="question1"&gt;
  &lt;legend&gt;Which are fruit?&lt;/legend&gt;
  &lt;label&gt;&lt;INPUT TYPE="checkbox" NAME="q1" VALUE="wrong"&gt;tomatoes&lt;BR&gt;&lt;/label&gt;
  &lt;label&gt;&lt;INPUT TYPE="checkbox" NAME="q2" VALUE="wrong"&gt;cucumber&lt;BR&gt;&lt;/label&gt;
  &lt;label&gt;&lt;INPUT TYPE="checkbox" NAME="q3" VALUE="right"&gt;apples&lt;BR&gt;&lt;/label&gt;
  &lt;label&gt;&lt;INPUT TYPE="checkbox" NAME="q4" VALUE="wrong"&gt;onion&lt;BR&gt;&lt;/label&gt;
  &lt;label&gt;&lt;INPUT TYPE="checkbox" NAME="q5" VALUE="right"&gt;bananas&lt;BR&gt;&lt;/label&gt;
  &lt;/fieldset&gt;
  &lt;input type="button" id="answer"&gt;
  </code></pre>
  
  <p>and JavaScript:</p>
  
  <pre><code>   document.getElementById("answer").onclick = validate;
      function validate() {
          var checkbox;
          var i;
          var right;
          checkboxes = document.getElementById("question1").getElementsByTagName("input");
  
          right = false;
          for(i = 0; i &lt; checkboxes.length; i++) {
              if(checkboxes[i].value == "right" &amp;&amp; checkboxes[i].checked == true) {
                right = true;
              }
          }
  
          if(right) {
              alert("You answered correctly");
          } else {
              alert("Wrong answer");
          }
      }
  </code></pre>
  
  <p>My Quiz is almost working but I only want it to be correct when all the right options are checked. At the moment when one correct option is selected it still returs as correct regardless of whether other incorrect ones were also selected.</p>
  
  <p>Here is the live sample: <a href="http://jsfiddle.net/nzLmxfx7/" rel="nofollow">http://jsfiddle.net/nzLmxfx7/</a>
  Thanks!</p>