I am using JQuery and the page acts like it refreshes but doesn't update my table. All my other JQuery commands using the location.reload(true);
do a hard refresh. Using this AJAX version doesn't seem to do it. I plan on using the AJAX later to just update a div, but for now the whole page refresh is what I need.
JS
$(document).ready(function(){
$('#import_audit').click(function(){
//alert("Audit Deleted");
$('#import_audit_div').modal('show'); //show modal with id="import_audit_div"
$('#import_audit_table').load("edit_audits.php?action=import"); //Doesn't load from database until modal is loaded.
});
$(function() {
$("#import_audit_form").submit(function(e) {
e.preventDefault();
// 'this' refers to this form element
var data = $(this).serialize();
$.ajax({
type: "POST",
url: "edit_audits.php?action=process_import",
data: data,
success: function (data) {
alert("Audit Transfered");
//$('#import_audit_div').modal('hide');
location.reload(true);
//trying to reload only the div
//$("#Results1").load(location.href + " #Results1");
}
});
});
});
});