title: How do I submit a form after JQuery Ajax validation?
body: <p>I can't get the .submit() jquery function to work I've boiled down everything in my code to: </p>
  
  <pre><code>  &lt;form action="/server/addserver.php" method="post" accept-charset="utf-8" id="mainform"&gt;&lt;input type="text" name="test" value=""  /&gt;&lt;input type="submit" name="submit" value="Submit" id="submitbutton" /&gt;&lt;/form&gt;
  
  &lt;script type="text/javascript"&gt;
      $("#submitbutton").click(
      function(){
           $("#mainform").submit();
               return false;
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Seems to me this should 1 - stop the default behavior of the button then 2 - manually submit the form. </p>
  
  <p>If i swap out .submit(); with .hide(); that works. Is this not the preferred way to manually submit a form after first running some ajax validation ? </p>
  
  <p>Thanks</p>