I have two forms.
I usually avoid the .submit() function as i almost always have to do something more with response that .submit() would allow me to do.
Thus, a non .submit option where you SUBMIT buttons would have to be changed to normal buttons.
$('.btn2').bind('click', function(){
var form1Data = $('#frm1').serialize();
$.ajax({
url : 'someurl',
type : 'post',
datatype : 'json',
data : form1Data,
success : function(json) {
sumbitForm2();
}
});
});
function submitForm2() {
var form2Data = $('#frm2').serialize();
$.ajax({
url : 'urlToSumbitForm1',
type : 'post',
datatype : 'json',
data : form2Data,
success : function(json) {
//do something if you need to
}
});
}