title: document.form.submit() with confirm()
body: <p>I have successfully used JavaScript <code>confirm()</code> using the <code>onClick</code> event handler.</p>
  
  <pre><code>&lt;input type="submit" onClick="return confirm(....);" /&gt;
  </code></pre>
  
  <p>And I have also successfully used <code>confirm</code> using the <code>onSubmit</code></p>
  
  <pre><code>&lt;form onSubmit="return confirm(....);"&gt;
  </code></pre>
  
  <p>Now my issue is, there is one specific situation where I want to submit the form by not clicking and just using <code>document.myform.submit()</code> but when ever I do it, it seems to bypass the confirm in the onSubmit event.</p>
  
  <p>How do I use <code>document.whateverform.submit()</code> together with confirm()?</p>