What I’m wanting to do is after I get the ajax request back that from the server and it was a success I want it to show the div.valid_box with the data.message inside of it with the proper css applied which it all does but afterwards I need it to just simply load the new page called index.php which is the admin panel page but it does not. Any ideas why?
$.ajax({
type: "POST",
url: "processes/login.php",
data: dataString,
dataType: 'json',
success: function(data) {
if (data.errorsExist) {
$('div.valid_box').hide();
$("div.error_box").html(data.message).css("margin-left", "145px").css("width", "520px").show();
} else {
$('div.error_box').hide();
$("div.valid_box").html(data.message).css("margin-left", "145px").css("width", "520px").show().delay(10000).hide("slow", function() {
$('body').load('index.php');
});
}
}
});
Try
instead of