Wednesday, 18 September 2013

updating page content after submitting

updating page content after submitting

i am using bootstrap modal with a form but i face problem with updating
the page content after submitting and alerting by a message.
$(function(){
$("button#submit").click(function(){
$.ajax({
type: "POST",
url: "customers.php",
data: $('form.customers').serialize(),
success: function(msg){
$("#message").html(msg)
$("#newcustomer").modal('hide');
},
error: function(){
alert("failure");
}
});
return false;
});
});

No comments:

Post a Comment