Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by dillong on May 05, 2009 16:33
open dhtmlx forum
dhtmlxGrid LoadXML error when uses filters in IE6

I seem to have a fairly urgent problem. It's been discovered that the grid component that I've implemented into a website can not do active filtering in IE6.

Although the grid propagates with data from a PHP generated XML initially, all subsequent calls made by filter text boxes added to each column throw the LoadXML error. From what I can tell by looking at the XML in IE6, it is not malformed. However, if I remove any active filters the grid does not propagate with data like it does on the initial page load.

On inspection, it's obvious that your grid is compatible with IE6 based on the component embedded in this site, so I was wondering if anyone can shed any light on what the problem might be.

Here is an example of the XML.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<rows total_count='1122' pos='0'>
<row id='326'>
<cell>
<![CDATA[<a href="vamp_editAsset.php?action=edit&id=326"><img src="./../../_images/admin/toolIcons/edit.png" alt="Edit" /></a>]]></cell>
<cell><![CDATA[GSD&M]]></cell>
<cell><![CDATA[YET Commercial (9/15)]]></cell>
<cell><![CDATA[]]></cell>
<cell><![CDATA[Robert Plante]]></cell>
<cell></cell><cell>00/00/0000</cell>
<cell></cell>
<cell><![CDATA[^]]></cell>
<cell></cell>
<cell></cell>
</row>
Answer posted by Support on May 06, 2009 02:10
The snippet, which you has provide, doesn't have a closing "rows" tag, but it most probably not a problem in full xml 

To resolve main issue - you need to remove next line
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 - it is not valid doctype for XML in any case
 - IE can't parse XML from the string when it contains any doctype

( actually there must probably one more error , hidden behind - please double-check that xml content sent with correct Content-type:text/xml ) 
Answer posted by dillong on May 06, 2009 06:39
On further inspection, I posted the wrong edit. I noticed that as well and removed it which causes the generated XML to display fine when accessed directly in IE6. There is also a </rows> at the bottom, I just wanted to give a snippet of the data.

I guess what I find strange is that the XML loads into the grid fine the first time, but then on all consequent filtering fails to load the XML even though accessing the filtered dataset displays fine in IE6. As far as I can tell from checking the headers sent, this is the difference:

Initial Successful load: ...admin/dhtmlxGrid/getGridRecords.php?pID=27

All consequent failures: ...admin/dhtmlxGrid/getGridRecords.php?name_mask=&producer_mask=&desc_mask=&requester_mask=&ponumber_mask=&complete_mask=&url_mask=&request_mask=&production_mask=&pID=27
(Shown is the header sent when a filter is added, then removed)

If it can load the first XML fine and NOT the second XML, both which generate identical code (double-checked), then I'm not sure what could cause it as I can't really see what would be a problem with the URL.

Is there a better way to troubleshoot this? Can the LoadXML error (Incorrect XML) be modified to give more useful information? Or am I just completely missing something.
Answer posted by Support on May 07, 2009 06:04
Try to use debug version of dhtmlxcommon.js (attached) instead of original one - it will show full text of error from XML parser.

>>even though accessing the filtered dataset displays fine in IE6.
Normally , if data shown correctly by browser during direct loading - it will be processed by AJAX call as well. 

IE has known limitation - it can't parse non UTF encoded XML, when it loaded from XML string, but it must not affect loading from external XML files|urls. 
Attachments (1)
Answer posted on May 07, 2009 06:38

You mention that your xml is "php generated".

My xml is also generated by php and I had to put a forward slash in front of double quotations.

So this: <![CDATA[<a href="vamp_editAsset.php.....

Would be this: <![CDATA[<a href=\"vamp_editAsset.php...