$(function(){ $('#modal_form').form({ url:'make-an-offer.php', onSubmit:function(){ return $(this).form('validate'); }, success:function(data){ $.messager.alert('Info', data, 'info'); } }); });