title: Form validation isn't actually returning false for one input field of the whole form
body: <p>So I'm working on a form validation project. We're given a set of criteria that our inputs must meet, and we've got to use regular expressions to check everything. I've got everything coded out, and everything works perfectly except for the first input. It checks against the regular expression, but if there's anything wrong with the match, it will return true instead of false, and bring the window to the "form accepted" page.</p>
  
  <pre><code>function validate_registration(){
      var RegExpName = /^[A-Z a-z]+$/;
      var RegExpCourseId = /^WEB*([1-9]{1})*[0-9]{2}$/;
  
      var studentName = document.reg_page.student_name.value;
      var courseID = document.reg_page.course_id.value;
  
      if (!RegExpName.test(studentName))
      {
          alert("Please enter the name on your Student ID");
          document.reg_page.s.focus();
          document.reg_page.s.select();
          return false;
      }
  
      else if (!RegExpCourseId.test(courseID))
      {
          alert("Please enter a valid Course ID");
          document.reg_page.c.focus();
          document.reg_page.c.select();
          return false;
      }
  }
  
  &lt;div id="container"&gt;
  &lt;div id="page"&gt;
      &lt;form name="reg_page" method="post" onSubmit="return validate_registration();"   action="thanks.htm" &gt;
      &lt;table id="form"&gt;
          &lt;tr&gt;
              &lt;td colspan="2"&gt;&lt;div id="table_title"&gt;Web Registration Form&lt;/div&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td class="label"&gt;Student Name:&lt;/td&gt;&lt;td&gt;&lt;input name="student_name" id="s" size="15" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td class="label"&gt;Course ID:&lt;/td&gt;&lt;td&gt;&lt;input name="course_id" id="c" size="10" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
  </code></pre>
  
  <p>That's the pertinent bits of the javascript and the form. The Course ID area works perfectly. If it's blank, it returns false, and highlights the text input field. Why won't it do the same with Student Name?</p>