This should be pretty simple, I can't figure out whey my ajax code keeps saying there is an error.
The data sends fine to the server, there are no errors on the server, it returns the expected results, but hits the 'error:' function every time.
Someone please help this is really anoying me :(
var sendData = new Object(), self = this;
sendData.type = 'get';
$.ajax({
type: "GET",
url: "/Highscores.aspx",
data: JSON.stringify(sendData),
dataType: "json",
success: function (respText) {
self.renderScores(respText);
},
error: function (xhr, ajaxOptions, thrownError) {
alert('An error occoured when getting the high scores');
}
});