A have the following problem. My code sends the the HTTP Request to ASP Handler:
var xmlRequest = !window.XMLHttpRequest ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest;
xmlRequest.open("GET", "Handler.ashx?value25="+$('#joKod').val()+"&operType=3");
xmlRequest.setRequestHeader('Content-Type', 'text/xml');
xmlRequest.onreadystatechange = function()
{
if (xmlRequest.readyState == 4)
{
if (xmlRequest.status == 200)
{
alert(xmlRequest.responseXML.xml);
}
}
}
xmlRequest.setRequestHeader("Content-Type", "text/xml");
xmlRequest.send('xml');
My handler creates XML answer
XmlDocument xd=Scoring.CheckLinkFirma(okpo);
resp.Clear();
resp.ContentType = "text/xml";
xd.Save(resp.Output);
And sends it back:
<?xml version="1.0" encoding="utf-8"?>
<Root>
<jo status="client">abc</jo>
<jo status="client">dfh</jo>
</Root>
In Exlorer responseXML.xml has value, but Chrome and FF it is undefined???
I found the answer in jQuery. Hope it will help someone