1

I looked through all the .ajax jsonp parsererror in stackoverflow and still couldn't figure how to get rid of this error.

JSONP Error: parsererror Error: jQuery21108956659331452101_1444622439301 was not called
JSONP was retrieved successfully

It was retrieved successfully and still not clear why I am getting the parsererror. Codes below. Any help would be greatly appreciated!

$.ajax(this.dataSrc, {
    type: "GET",
    dataType: "jsonp",
    jsonp: "callback",
    error: function(xhr, status, error) {
        console.log('JSONP Error: ' + status + error);
    },
    complete: function(xhr, status) {
        console.log('JSONP was retrieved successfully');
    }
});
3
  • check whether the said url is returning a jsonp response... looks like it is not... check what is the response content Commented Oct 12, 2015 at 4:16
  • the response should have callback response, check this at your response function @Jason Tang
    – Gayathri
    Commented Oct 12, 2015 at 4:21
  • Thanks! I am able to see the response and the data is rendering fine on the page. It just that I wanted to get rid of the "parsererror". Is it because the json data is stored in the JS file that's why I am getting the parser error?
    – Jason
    Commented Oct 12, 2015 at 7:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.