It's easy,
this way you put after the submit, to achieve few instructions, or fields validation ...
see below :
<script>
function onSubmit(_all_args,_args_two){
document.getElementById("the_form_to_send").submit();
}
</script>
you have to call 'onclick="onSubmit();" from your form :
<form ......>
/ all inputs here .....
<input type="button" .... onclick="onSubmit(_all_args , .........);" value="submit text button">
</form>