title: Javascript return false, alert not working
body: <p>i'm trying to make sure certain fields are not left blank in my form. it seems simple enough but for some reason it's not working. The alert is not showing, and return false is not working (it continues to post blank entries into my database) please help, what am i doing wrong. thank you!</p>
  
  <p>the script:</p>
  
  <pre><code>function check(){
  var name = getElementById('name');
  var date = getElementById('date');
  var pri = getElementById('pri');
  var asapc = getElementById('asapc');
  var asapn = getElementById('asapn');
  var obr = getElementById('obr');
  var obc = getElementById('obc');
  var obn = getElementById('obn');
    if (name.value == "" || date.value == "" || pri.value == "not" || asapc.value == "" ||  asapn.value == "" || obr.value == "" || obc.value == "" || obn.value == "") {
      alert( "One or more fields were not filled out." );
      return false ; }
      return true;
   }
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>&lt;FORM ACTION="step2.php" METHOD="POST" onsubmit="check();"&gt;
  &lt;!-- fields here --&gt;
  &lt;INPUT TYPE="submit" VALUE="CONTINUE"&gt;
  </code></pre>