php - How to show an Alert via ajaxSubmit? -
i'm trying display alert message through ajaxsubmit successful in example code below:
submithandler: function( form ){ var dados = $( form ).serialize(); $.ajaxsubmit({ type: "post", url: "...", data: dados, complete: function( data ) { // $("#cargo").resetform(); alert("alert message"); $("#txtnome").focus(); $("#txtnome") .hide() .show("slow"); document.getelementbyid("cargo").reset(); } }); return false; } but every time form data saved, no alert message shown! can me?
check code. working.
jquery('#formid').validate({ submithandler: function(form) { jquery("#formid").ajaxsubmit({ success: function(data) { alert("hello"); jquery('#element').html(data); }, data: {ajax:'true', tab:'true'} }); } }); put code in format.
Comments
Post a Comment