dhtmlxAjax XPath work on firefox but not for IE

Hi,

I’ve a simple code dhtmlxAjax XPath , it work very good on firefox, but not on IE, can you tell me what’s the problem?

function outputResponse(loader) {
    if (loader.xmlDoc.responseXML != null) {
        
        path = "/rows/row/cell";
        var nodes = loader.doXPath(path);
        
        for (var i = 0; i < nodes.length; i++) {
            alert(nodes[i].childNodes[0].nodeValue);
        }
    }
    //alert("We Got Response\n\n" + loader.doSerialization());
    else
        alert("Response contains no Text");
}

function sendRequestGet() {

    var loader = dhtmlxAjax.getSync("SelectGpeServlet");

    outputResponse(loader);
}

Please help.

Thanks

Ke PENG

This is my simple xml called by a servlet :

<rows>
   <row>
      <cell>value1</cell>
      <cell>value2</cell>
      <cell>value3</cell>
      <cell>value4</cell>
   </row>
</rows>

We have not reproduced the problem locally. Please take a look at the attached sample.

Make sure that content-type is correct. You need to send the data with Content-type:text/xml
demo.zip (7.64 KB)

Thanks you Alexandra,

I’am sorry, i’ve the same problem with your demo locally, is it the problem of the configutaion IE8?

ke

is it the problem of the configutaion IE8?

Old IE versions use ActiveXObject instead of XMLHttpRequest for server requests. Please check that “Run ActiveX” is enabled in your browser.