title: document.getElementById("myForm").submit() is not working
body: <pre><code>    &lt;form name="formName" id="formName" action="" method="post" autocomplete="off"&gt; 
          &lt;input type="hidden" name="text1" id="text1" value='0' /&gt;
          &lt;input  type="button" name ="submit" onClick="Submit()"  value="submit"&gt;
      &lt;/form&gt;`
   &lt;script&gt;  
      function Submit() //my function
      {
          document.getElementById("formName").submit();
      }
  &lt;/script&gt;
  I need some help... I have also tried `this document.formName.submit();` but still not working.
  </code></pre>
  
  <p>on debugging i got this error :Uncaught ReferenceError: <strong><em>formNameis not defined</em></strong></p>