I have a form with id theForm which has the following div with a submit button inside:
theForm
It works perfectly in my case.
document.getElementById("form1").submit();
Also, you can use it in a function as below:
function formSubmit() { document.getElementById("form1").submit(); }