title: Using Javascript to submit forms
body: <p>EDIT: For some reason if I change the input into an , the submit code works fine. Ok, this works, I'll just style the a tag to look like an input tag in css.</p>
  
  <p>I am using a jQuery function to submit a form when a certain button is pressed, however this seems to have no effect on the form.</p>
  
  <p>My code is as follows:
  HTML:</p>
  
  <pre><code>&lt;form id="loginForm" action="" method="POST"&gt;
      &lt;input class="loginInput" type="hidden" name="action" value="login"&gt;
      &lt;input id="step1a" class="loginInput" type="text" name="username"&gt;
      &lt;input id="step2a" class="loginInput" type="password" name="password"  style="display:none;"&gt;
      &lt;input id="step1b" class="loginSubmit" onclick="loginProceed();" type="button" name="submit" value="Proceed" title="Proceed" /&gt;
      &lt;input id="step2b" class="loginSubmit" onclick="submitlogin();" type="button" value="Validate" title="Validate"  style="display:none;" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>function submitlogin()
  {
      $("#loginForm").submit();
  }
  
  function loginProceed()
  {
      $("#step1a").fadeOut("slow",function(){
          $("#step2a").fadeIn("slow", function(){
              $("#step2a").focus();
          });
      });
      $("#step1b").fadeOut("slow",function(){
          $("#step2b").fadeIn("slow");
      });
      $("#step1c").fadeOut("slow",function(){
          $("#step2c").fadeIn("slow");
      });
  
  }
  </code></pre>
  
  <p>However, when I press the button, absolutely nothing occurs. </p>
  
  <p>PS. This function may seem meaningless since I can just use a input type="submit" but I originally intended this to have some more functionality, I stripped the function to its bare bones for testing purposes.</p>