Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Alam on Jun 29, 2009 05:44
open dhtmlx forum
DHTMLX Tree on Accordion

Hello
I have a script that composed by Layout and Accordion. In one of Layout cell i want to attach accordion object, which one of the accordion object attached with tree generated by php script.
Here the script i used:

var radMenuTree = radAccord.cells("a2").attachTree();
radMenuTree.setImagePath("lib/dhtmlx/dhtmlxTree/imgs/csh_bluebooks/");
radMenuTree.loadXML("generateMenu.php");
radMenuTree.setOnClickHandler(doOnClick);

However when checking in Firefox 3 with Firebug, there are following errors:

Components is not defined
loadXMLString()(Object htmlNode=table tr=0 childsCount=1 tempDOMM=0, "6", "Utilitas", 0, "folderClosed.gif", "folderOpen.gif", "folderClosed.gif", "OPEN", undefined, 0, Object htmlNode=table tr=tr childsCount=0 tempDOMM=0)dhtmlxtree.js (line 34)
insertNewItem()(Object d=item, Object htmlNode=table tr=0 childsCount=1 tempDOMM=0, Object htmlNode=table tr=tr childsCount=0 tempDOMM=0, undefined)dhtmlxtree.js (line 49)
(?)()(Object d=item, 0)dhtmlxtree.js (line 57)
get_all()("item", function(), Object, 0)dhtmlxtree.js (line 14)
_parse()(Object d=item, "0", 1, undefined)dhtmlxtree.js (line 57)
insertNewItem()(Object d=item, Object htmlNode=table tr=0 childsCount=1 tempDOMM=0, 0, undefined)dhtmlxtree.js (line 51)
(?)()(Object d=item, 0)dhtmlxtree.js (line 57)
get_all()("item", function(), Object, 0)dhtmlxtree.js (line 14)
_parse()(Object d=tree, "0", undefined, undefined)dhtmlxtree.js (line 57)
insertNewItem()(Object, null, null, null, Object xmlDoc=XMLHttpRequest async=true mainObject=Object)dhtmlxtree.js (line 46)
waitLoadFunction()()dhtmlxcommon.js (line 16)
[Break on this error] {parentObject.XMLload=1;this._loadDynXM...=afterNode.tr.previousSibling.nodem}else
dhtmlxtree.js (line 34)
afterNode.tr.previousSibling is null
[Break on this error] {parentObject.XMLload=1;this._loadDynXM...=afterNode.tr.previousSibling.nodem}else
dhtmlxtree.js (line 34

What could be the problem? I previously load it directly from xml file and it working fine.

radMenuTree.loadXML("tree.xml");

When generated from php it not showing.

Thank you so much for your assistance.
Best Regards,

Alam Aby Bashit
Answer posted by Support on Jun 29, 2009 07:51
Please be sure that xml response, which generated by server 
 - contains valid IDs for all items ( each ID must be unique ) 
 - sent with valid content type  text/xml
 - has not any white-spaces before start of xml output

Any of above errors may prevent correct loading. 
Answer posted by Alam on Jun 29, 2009 20:15
Hello,
Thank you so much for your answer! I didnt't notice this one:

 - contains valid IDs for all items ( each ID must be unique )

So, right. There are duplicate ids. Now it's work fine.
Once again, Thank You very much. Have a nice day!

Best Regards,

Alam Aby Bashit