Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Agata Malczewska on Mar 27, 2009 07:49
open dhtmlx forum
docObj is null

I have a problem with updating tree nodes in Mozilla Firefox (in IE it works fine).
When I modify the node name, drag&drop a node, move a node or whatever, the changes are saved to the database, but an error occurs (in Firebug):

docObj is null
doXPath()("//data/action", null, undefined, undefined)dhtmlxcommon.js (line 68)
afterUpdate()(Object serverProcessor=Pages/Pomoc/update obj=Object, null, null, null, Object xmlDoc=XMLHttpRequest async=true mainObject=Object)dhtmlxda...cessor.js (line 24)
waitLoadFunction()()dhtmlxcommon.js (line 15)
[Break on this error] ]);if (docObj.nodeName.indexOf("documen...Type=XPathResult.FIRST_ORDERED_NODE_TYPE

From the debugger:

XML status: incorrect
Server response:
<?xml version="1.0" encoding="UTF-8"?>
<data><action type="update" sid="19" tid="19"/></data>

Error type: LoadXML
Description: Incorrect XML

In IE the XML status is correct.

What may be the reason of the problem?
Answer posted by Alex (support) on Mar 27, 2009 08:01

In case of FireFox the problem can be caused by any whitespace before <?xml declaraton (the declaration must be the first text in the output).

Also, please, check that the Content-type is correct - text/xml.