I have a problem, after first submit form success and load div,Form no submit update data second time.
Here code, please help me, thanks.
$(document).ready(function() {
$('.edit_gv').click(function() {
var id = 'modal_' + $(this).val();
$('#' + id).modal({
backdrop: 'static',
keyboard: false
});
});
$('.editgv_form').submit(function(e) {
/*$('.editgv_form').on('submit', 'input[name=submit]', function (e) {*/
e.preventDefault(); // Prevent Default Submission
$.ajax({
url: $path + 'edit_gv.php',
type: 'POST',
data: $(this).serialize() // it will serialize the form data
})
.done(function(data) {
$('#modal_edit_gv').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
$("#all_giang_vien").load($path + '/giang_vien_load.php');
})
.fail(function() {
alert('Ajax Submit Failed ...');
});
return false;
});
});