I'm a bit out of my depth here and need some help. The following works fine with jquery 1.7 and below, but will not work with later versions. Can someone please steer me in the right direction?
// -- Start AJAX Call --
$.ajax({
type: "POST",
url: "do-login.php", // Send the login info to this page
data: str,
success: function (msg) {
$("#status").ajaxComplete(function (event, request, settings) {
// Show 'Submit' Button
$('#submit').show();
// Hide Gif Spinning Rotator
$('#ajax_loading').hide();
if (msg == 'OK') {// LOGIN OK?
go_to_private_page();
} else { // ERROR?
var login_response = msg;
$('#login_response').html(login_response);
}
});
}
});
// -- End AJAX Call --
Try this:
$.ajax({
type: "POST",
url: "do-login.php", // Send the login info to this page
data: str
}).done(function (msg) {
// Do your thing here.
});
Take a look at JQuery document: https://api.jquery.com/jQuery.ajax/