title: And again: submit is not a function
body: <p>I have the following code for my form:</p>
  <pre><code>&lt;form name=&quot;myform&quot; id='form' class=&quot;form&quot; method='post' accept-charset='UTF-8' action=&quot;action.php&quot;&gt;
  
  
  &lt;div&gt;
  &lt;input type='submit' id=&quot;sendbtn&quot; value='Hello' class=&quot;loginbutton&quot;&gt;
  &lt;/div&gt;
  
  &lt;/form&gt;
  </code></pre>
  <p>In my Javascript I have a form checker that - if the check succeeds - should submit the form. However - that doesn't work.</p>
  <p>The javascript is:</p>
  <pre><code>const sendit = document.getElementById(&quot;sendbtn&quot;);
  
  function showSuccess(input){
      const formControl = input.parentElement;
      formControl.className = 'form-control success';
      sendit.submit();
  }
  </code></pre>
  <p>That code throws the error:</p>
  <pre><code>Uncaught TypeError: sendit.submit is not a function
  </code></pre>
  <p>Because I already learned that names or ids called &quot;submit&quot; override the submit-function, I checked my code for the usage of &quot;submit&quot;. But there's simply no other usage in the php or the javascript except an addEventListener for the type &quot;submit&quot;.</p>
  <p>What could be the problem here?</p>