I have java script function in which i made jquery ajax call to my web services for retrive data. This function work well with browser IE9 but throw an error on other browser(chrome, opera) including IE10 also.
function DataRequest()
{
$.ajax({ type: "POST",
url: Wurl,
data: bhrequest,
timeout: 10000,
contentType: "text/xml",
datatype: "xml",
beforeSend: function (xhr) {
xhr.setRequestHeader("SOAPAction", "http://www.demo.com/Webservice");
},
success: function(result, status){
OnCompleteCustomer(result);
},
error: function (xhr, status, error) {
alert(error);
}
});
}
Here
Wurl is the url of services.
bhrequest is data parameters send to services and
OnCompleteCustomer is method calling after successful.
but it's gone on error and thrown above
mansion mentioned error.
Above error solve by don't setting datatype for response. data type parameter leave blank
I debug my code and got the result,that it's get result string in
result
argument of success function on IE9 browser.
But in Chrome the result string is blank.
Please tell me what is the reason behind it.