I usually avoid the .submit () function, since I almost always have to do something more with an answer that would allow me to allow .submit ().
Thus, the non.submit option, in which you must enter the SUBMIT buttons, must be replaced with regular 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) {
source share