from submit using javascript code example
Example 1: javascript prevent form submit
<form name="foo" onsubmit="return false">
Example 2: javascript submit a form
document.getElementById("myFormID").submit();
<form name="foo" onsubmit="return false">
document.getElementById("myFormID").submit();