grid.parse doesn't work on IE, FF only.

Hi,



I am new to dhtmlxGrid, so it is probably very basic what I’m missing.

I have followed the tutorial to create my first grid and it works fine in FF,

but it doesn’t in IE (6/7/8). I use grid.parse(xmlObj) function to initiate it,

but in IE it stuck on this call, nothing happens and I do not see that the

code that follows this call executed (alert “done” for example).



This is my XML. What is wrong?



<?xml version="1.0" encoding="UTF-8"?>



    

        

        

        

    





Regards,

Yuri

The XML data is fully correct, how do you loading it to the client side ?
The grid.parse can be used against
a) XML island
b) XML string
c) custom XML object

Attached sample uses the same XML as XML-island and XML-string - and it works in both IE and FF.
If you are using some custom way to load XML data - please provide more details.

1212426463.zip (83.9 KB)

Hi,

Thank you for your quick reply.
I am using AJAX framework get and load XML data for the table.

On the server side I am doing this (Java servlet):

response.setContentType(“text/xml;charset=utf-8”);
textOut = response.getWriter();
textOut.print(XMLUtil.getDomAsString(xmlDoc));  //xmlDoc here is org.w3c.dom.Document object and XMLUtil.getDomAsString method returns string representation of the document using following code:

import com.sun.org.apache.xerces.internal.dom.DocumentImpl;
import com.sun.org.apache.xerces.internal.parsers.DOMParser;
import com.sun.org.apache.xml.internal.serialize.OutputFormat;
import com.sun.org.apache.xml.internal.serialize.XMLSerializer;

OutputFormat format = new OutputFormat(xmlDoc);
String stringOut = new StringWriter();
XMLSerializer serial = new XMLSerializer(stringOut, format);
serial.asDOMSerializer();
serial.serialize(xmlDoc.getDocumentElement());
return stringOut.toString();

Then I send it back to client using [new XMLHttpRequest.responseXML] for FF or [new ActiveXObject(‘Microsoft.XMLHTTP’).responseXML] for IE object and process as follows:
function processResponse(xmlDoc, requestObject) {
        if (xmlDoc.documentElement.getElementsByTagName(“row”).length > 0) {
               grid.parse(xmlDoc);               
        }
        …
}

That’s all. This framework works fine in our application for years for both browsers,
I also can parse it by myself to see that the returned object is valid and correct, but grid’s parse method call just hangs… :frowning:

Problem with loading through ‘Microsoft.XMLHTTP’ confirmed and fixed
Please use attached js file instead of original one ( the full package will be updated in nearest time )
Attached js file is for standard version of grid, if you need the same update for the PRO version - please contact us directly at support@dhtmlx.com

By the way, the component provides grid.load - built in method, which can be used to load data directly from server side script

dhtmlxgrid.zip (32.1 KB)