Sunday, 15 January 2012

java - JSONP executes error block while making an ajax call during page load even though the status is 200 OK -



java - JSONP executes error block while making an ajax call during page load even though the status is 200 OK -

during page load jsonp executes error block while making ajax phone call though status 200 ok , error text "parseerror". same ajax phone call executes success block when called on click event ui.

$.ajax({ crossdomain : true, type : "get", contenttype : "application/json; charset=utf-8", datatype : "jsonp", jsonpcallback : 'success', url : "rest/getrecommendation", cache: false, timeout : 15000, : function(data) { }, error : function(responsedata, textstatus, errorthrown) {

java jquery

No comments:

Post a Comment