title: mandatory radio button checked in form not working
body: <p>I have been at this for well over an hour and searched here and on the Web for an answer, but can't get this to work, so I am now asking for some help please.</p>
  
  <p>I have a form where all fields are mandatory to be filled, including a "Radio" button to be selected, the radio button group called "instrument".</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Here is my Javascript:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      function checkFields(f) {
          name1 = document.form1.name1.value;
          name2 = document.form1.name2.value;
          email1 = document.form1.email1.value;
          instrument = document.form1.instrument.value;
          stylemusic = document.form1.stylemusic.value;
  
          if ((name1 == "") || (name2 == "") || (email1 == "") || (instrument == "") || (stylemusic == "")) {
              alert("All fields need to be filled.");
              return false;
          }
  }
  </code></pre>
  
  <p>and my form code:</p>
  
  <pre><code>&lt;input type="radio" value="percussion" name="instrument"&gt;Percussion
  &lt;input type="radio" value="wind" name="instrument"&gt;Wind
  </code></pre>