The below function is used to get information from web service using jQuery. This code works fine in I.E 10 but it returns error "No Transport" in I.E 8 and I.E 9.
function GetDemo(User){
var webMethod = "http://---------/Service.asmx/Demo";
var parameters = '{"UserName":"'+ User + '"}';
$.ajax({
type: "POST",
url: webMethod,
data: parameters,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
if(typeof msg.d[0] !== "undefined") {
$("#Designation").html(msg.d[0]['Designation']);
}
else
{
// $("[title='Name']").val("");
}
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(xhr.responseText);
alert(thrownError);
} });
}
Any suggestions ??