About Form Submitting by JavaScript

Don't name any of the form fields as "submit" like so:

1
<button type="submit" name="submit">Save</button>

Because when you do this, you can't execute document.getElementById('my_form').submit(), as document.getElementById('my_form').submit now refers to the field instead of the form method.

Tips and Tricks Programming JavaScript HTML5