title: javascript: does onsubmit only execute when it detects a "return false"
body: <p>i dont quite understand how the <code>onsubmit="return validate()"</code> works.
  why do i have to <code>return</code> the function? does this work only when it detects a <code>return false</code> from the statement?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function validate() {
          if ((document.example2.naming.value == "") || (document.example2.feed.value == "")) {
              alert("You must fill in all of the required .fields!");
              return false;
          }
          else {
              return true;
          }
  &lt;/script&gt;
  
  &lt;form name="example2" onsubmit="return validate()"&gt;
  &lt;input type="submit" name="B1" value="Submit"&gt;​​​​​​​
  </code></pre>