So im having a weird issue. I made a small application on my machine that works fine but when I upload to a school server it stops working. What I am doing is accessing json data with ajax. I have tested and I am getting the correct json responses, I am connecting to the database just fine and the ajax is running every two seconds as it should. But the code in the success section of the ajax never runs. The database on the server is identical to the one on my machine, the connection has been troubleshooted and works great but still the ajax success code doesn't run. Thanks in advance!
setInterval(function () {
$.ajax({
type: 'GET',
url: 'JSONFile.php',
dataType: 'json',
success: function (retrieved) {
$.each(retrieved, function (index, i) {
alert('This line of code is the problem. This alert does not run but should');
});
}
});
}, 2000);