how to call javascript function after form submit code example
Example 1: javascript prevent form submit
<form name="foo" onsubmit="return false">
Example 2: javascript submit form
document.forms["myform"].submit();
<form name="foo" onsubmit="return false">
document.forms["myform"].submit();