I have a div created with the form inside and set to publish using ajax and returning the results in the div like this:
$(document).ready(function(){
$("#guestList").validate({
debug: false,
submitHandler: function(form) {
$.post('brides_Includes/guestlistDisplay1.php', $("#guestList").serialize(), function(data) {
$('#results').html(data)
$("form#guestList")[0].reset();
});
}
});
});
When the results return, they show the correct changes and replace the form. However, when I submit the form again. Corresponding changes occur as they should, but then it refreshes the page and displays the posted information in the address bar.
How can I post a form and replace it so that it can post messages and call the script again if this does not happen?
source
share