title: "Submit is not a function" error in JavaScript
body: <p>Can anyone tell me what is going wrong with this code? I tried to submit a form with JavaScript, but an error ".submit is not a function" shown. See below for more details of the code:</p>
  
  <pre><code>&lt;form action="product.php" method="get" name="frmProduct" id="frmProduct" enctype="multipart/form-data"&gt;
  
  &lt;input onclick="submitAction()" id="submit_value" type="button" name="submit_value" value=""&gt;
  
  &lt;/form&gt;
  
  &lt;script type="text/javascript"&gt;
      function submitAction()
      {
          document.frmProduct.submit();
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function submitAction()
      {
          document.forms["frmProduct"].submit();
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Both show me the same error  :(</p>