Categories | Question details Back To List | ||||||||
dhtmlxGrid I have a problem with dhtmlxgrid. Problem come from xml file. I get my xml file by dynload.php Xml file is accept by FF but don't works on IE7 Here the XML file generated by dynload.php: (there is not Whitespace before "<?xml", and if I remove <?xml version='1.0' encoding='utf-8'?> I've got the same result: works on FF and doesn't work on IE7) <?xml version='1.0' encoding='utf-8'?> <rows pos="1"> <row id='r0'> <cell>76</cell> <cell><![CDATA[<a href="index.php?">Mr X</a>]]></cell> <cell><![CDATA[<a href="sterX@aabbcc.fr">sterX@aabbcc.fr</a>]]></cell> <cell type='txt'>29/06/2007 ORD-11111</cell> <cell><![CDATA[ <a href='index.php?' ><img src='http://localhost/workspace/editer.gif' width=16px height=16px border=0></a> <a href='index.php?' ><img src='http://localhost/workspace/effacer.gif' width=16px height=16px border=0></a>]]></cell> </row> <row id='r1'><cell>31</cell> <cell><![CDATA[<a href="index.php?">Mister Y</a>]]></cell> <cell><![CDATA[<a href="sterY@aabbcc.fr">sterY@aabbcc.fr</a>]]></cell> <cell type='txt'>30/07/2007 ORD-22222</cell> <cell><![CDATA[ <a href='index.php?' ><img src='http://localhost/workspace/editer.gif' width=16px height=16px border=0></a> <a href='index.php?' ><img src='http://localhost/workspace/effacer.gif' width=16px height=16px border=0></a>]]></cell> </row> </rows> Maybe error come from header, I sent them like this: if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) { header("Content-type: application/xhtml+xml"); } else { header("Content-type: text/xml"); } Moreover if I execute directly dynload.php, XML is printed correctly on IE7, I'don't have any error message. Have you an idea? Thank you. RLM Answer posted by Support on Dec 06, 2007 03:30 >> header("Content-type: application/xhtml+xml"); } else {
This content type is not shown correctly in my case , but latest code already has workaround and can load it in IE7, still it is more correct to use text/xml content type >>Moreover if I execute directly dynload.php, XML is printed correctly on IE7, I'don't have any error message. Unfortunately I can't reconstruct problem. Please check attached sample it uses the same XML as yours loaded through PHP - and it works in both IE7 and FF6 Also attached version contains debug version of dhtmlxcommon - please try it with your code it will show additional info. Attachments (1)
Answer posted by Rémi LE MONNIER on Dec 06, 2007 05:21 I have found the error. An accent corrupted my XML file, I would like to print "André" it's doesn't work on IE7 but it's work on FF. If I replace "André" by "Andre", it's ok for both browser. Should I encode accent before, put them in the XML file? If I put accent encode in HTML, I got an error too. What's is the solution? Thank you. RLM Answer posted by Support on Dec 06, 2007 06:13 You need to set correct encoding in XML header, in your case it probably will look as <?xml version='1.0' encoding='iso-8859-1'?> Answer posted by Rémi LE MONNIER on Dec 06, 2007 06:26 Ok problem solved! Thank you for your help and your fastness! RLM |