I am having an issue with a function that I have created to make an ajax call. Despite using the .done
method, it does not seem to be firing as expected. Upon checking my console for errors, I came across the following message:
https://i.sstatic.net/CbYBR.png
function getIncidentInfo() {
$.ajax({
type: "GET",
url: "../../page_components/statsboard/stats.php",
data: $(this).serialize(),
dataType: "json",
}).done(function(response) {
incidentAr = response;
for (var i in incidentAr) {
var zaNorth = parseInt(incidentAr[i].zaNorth);
......
}
}).fail(function(xhr, status, error) {
console.log("Status: " + status + " Error: " + error);
console.log(xhr);
});
}
I reached out to a friend and asked them to test the same piece of code, and they reported that it worked perfectly for them.