$(function(){
$.ajax({
url: 'http://xxx/',
type: 'GET',
crossDomain:true,
cache:true,
dataType:"script",
success:function(data,textStatus,jqXHR){
alert(data);
}
});
});
actually server is returning json object and in my firebug it is showing
SyntaxError: invalid label
What can I do ?
If the server returns json, then you could not get the data even you set
crossDomain:true.If you want to crossDomain work, the server need to support JSONP, which is wrapping the json with a callback function.