title: Auto-Submit Form using JavaScript
body: <pre><code>&lt;form name="myForm" id="myForm" action="test.php" method="POST"&gt;
    &lt;p&gt;
    &lt;input name="test" value="test" /&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;input type="submit" name="submit" value="Submit" /&gt;
    &lt;/p&gt;
  &lt;/form&gt;
  
      &lt;script&gt;
  
      var auto_refresh = setInterval(
      function()
      {
      submitform();
      }, 10000);
  
      function submitform()
      {
        alert('test');
        document.myForm.submit();
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>I'm having trouble trying to auto-submit a form every <strong><em>10 seconds</em></strong> once landed on a page. The form name is myForm <code>action="test.php"</code>. I get the <code>'test'</code> message but the page doesn't submit the form.</p>
  
  <p>Any solutions besides autoloading the function upon page load?</p>
  
  <p><strong>FIXED:</strong> Removed (<code>name="submit"</code>) from the submit button and it worked smoothly.</p>