How to submit a form using javascript?
<p>I have a form with id "theForm" which has the following div with a submit button inside:</p>

<pre><code>&lt;div id="placeOrder" style="text-align: right; width: 100%; background-color: white;"&gt;
   &lt;button type="submit" class='input_submit' style="margin-right: 15px;" onClick="placeOrder()"&gt;Place Order&lt;/button&gt;
&lt;/div&gt;
</code></pre>

<p>When clicked, the function "placeOrder()" is called. The function changes the innerHTML of the above div to be "processing ..." (so the submit button is now gone). </p>

<p>The above works, but the problem is that I now can't get the form to submit! I've tried putting this in the placeOrder() function:</p>

<pre><code>document.theForm.submit();
</code></pre>

<p>But that doesn't work.</p>

<p>How can I get the form to submit?</p>
