i have some code in ajax call like below
$.ajax({
url: query_string,
cache: true,
type: 'GET',
async: false, // must be set to false
success: function (data, success) {
alert(jquery.parseJSON(data));
alert('success');
//alert(data);
//alert(success);
},
dataType: 'jsonp',
error :function( jqxhr, textStatus, error ) {
var err = textStatus + ', ' + error;
alert(err);
},
complete: function (jqxhr, textStatus ){
//alert( "complete: " + JSON.stringify(jqxhr)+" "+ textStatus );
}
});
when i run this code into firefox with fire bug. firebug shows response in perect json format but shows following error in firebug
SyntaxError: missing ; before statement
{"products":[{"title":"xyz","id":1718,"created_at
so how can i solve it??