title: error in my code for user registration form validation, when the user submits the form
body: <p>Issues in my code for form validation, when the user submits the form
  1.after validating the text field also.Still it shows the error message.
  2.further I want to know how to validate if all the field is null?</p>
  
  <pre><code>&lt;!doctype html&gt;
  
      &lt;html&gt;
      &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Jquery Validation&lt;/title&gt;
      &lt;script src="js/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="js/thk.js.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
      &lt;form name="jsqval" action="action.php" method="post"&gt;
          &lt;table width="56%" border="1" cellspacing="0" cellpadding="10" align="center"&gt;
  
        &lt;tr&gt;
          &lt;td&gt;Name:&lt;input type="text" name="usernmae" value="" id="name" /&gt;&lt;br&gt;&lt;span id="names" style="color:#F00;"&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;E-Mail Id:&lt;input type="text" name="email" value="" id="email" /&gt;&lt;br&gt;&lt;span id="emails" style="color:#F00;"&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt;Class Location:&lt;br&gt;
              &lt;input type="checkbox" name="myhome"  value="My Home"&gt;My Home
              &lt;input type="checkbox" name="TutorHome"  value="Tutor's Home"&gt;Tutor's Home
              &lt;input type="checkbox" name="institute"  value="Institute or Coaching Center"&gt;Institute or Coaching Center
              &lt;input type="checkbox" name="online"  value="Online Class"&gt;Online Class
              &lt;span id="check" style="color:#F00;"&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt;&lt;input type="submit" value="submit" id="submit"&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/form&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>my jquery:</p>
  
  <pre><code>$(document).ready(function() {
      $('#submit').click(function() {
          a=$('#name');
          if(a.val()=='')
          {
              $('#names').html("Please Enter Your Name");
              a.focus();
              return false;
          } 
  
          b=$('#email');
          if(b.val()=='')
          {
              $('#emails').html('Please enter your e-mail Address');
              b.focus();
              return false;
          } 
  
  
           y = false;
               $('input[type="checkbox"]').each(function() {
                   if (this.checked) 
                   {
                   y = true;
                   }
  
                  if (y==false) 
                  {
                    $('#check').html("Please Check me");
  
                  }
                  return false;
               });
  
  
  
      });
  
  });
  </code></pre>