title: JavaScript code returns false, but still the form is submittted
body: <p>I have a form with JavaScript validation. Upon there being an error, the submit button should 'grey-out' and the form should not be submitted. However, the last couple of functions seem to submit the form even though they pop the alert box. Why?</p>
  <p>Button code:</p>
  <pre><code>&lt;input type=&quot;submit&quot; name=&quot;button&quot; id=&quot;button&quot;
         onclick='return formvalidation();' value=&quot;Next&quot; /&gt;
  </code></pre>
  <p>Non-working function example:</p>
  <pre><code>function BlankSite() {
      var SiteNum= document.getElementsByName(&quot;sitesinput&quot;)[0].value;
      if ((SiteNum == &quot;&quot;) || (SiteNum == 0))
      {
          alert(&quot;You have not selected an amount of sites.&quot;)
          document.forms[0].button.disabled = true;
          return false;
      }
  }
  </code></pre>
  <p>Function initiator:</p>
  <pre><code>function formvalidation()
  {
      ZeroPhones();
      BlankPC();
      BlankSite();
      BlankSeats();
      phone_change();
  } // End of formvalidation
  </code></pre>
  <p>This is very strange and I have tried various workarounds all to no avail!</p>