title: javascript gender validation
body: <p>i'm trying to make a validation for registration form but i got a problem with gender validation using radio button in javascript..
  i hope anyone can help me to solve this problem :D</p>
  
  <p>here is my code </p>
  
  <pre><code>function validate(form)
  {
      var genderM=form.gender_male.value;
      var genderF=form.gender_female.value;
  
      if(genderM.checked==false &amp;&amp; genderF.checked==false )
         {
              alert("You must select male or female");
              return false;
         }   
   }
  </code></pre>