You can write your own function.
function submit (){
document.getElementById("firstform").submit();
document.getElementById("secondform").submit();
}
You can then make a button that calls this function.
If this doesn't work, try again using ajax. Example