185
rated 0 times
[
191]
[
6]
/ answers: 1 / hits: 13790
/ 11 Years ago, wed, december 18, 2013, 12:00:00
I am using below code to access rest service hosted on another domain.
$.ajax({
type: 'GET',
url: url,
async: false,
jsonpCallback: 'jsonCallback',
contentType: application/json,
dataType:jsonp,
success: function(json) {
alert(json);
},
error: function(e) {
console.log(e.message);
}
});
I am able to get the data correctly, but I get this error in firebug in mozilla:
SyntaxError: missing ; before statement
{Hello:World}
Can anyone suggest me what I am doing wrong here? Even though Json data is valid. I tried all the suggestions posted in this question But still I am getting same error.
More From » jquery