The below code works fine but the only problem is not giving me the textStatus
. What do I need to do in order to get textStatus
?
var url = "http://host/MyServiceImpl.svc/GetCount?method=?";
$.ajax({
dataType: 'jsonp',
data: { Id: '1' },
jsonp: 'jsonp_callback',
url: url,
success: function (json, textStatus) {
alert(json.d);
alert(textStatus);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
debugger
}
});
or
$.getJSON(url, { Id: '1'},
function (data, textStatus) {
alert(textStatus);
});