I try display a tree with preselected items. Because I have a large tree, I selected to use dynamic loading.
Know the problem is that when I write this:
var tree=new dhtmlXTreeObject(‘tree’,“100%”,“100%”,0);
tree.setImagePath("…/…/imgs/");
//load root level from xml
tree.loadXML("./xml.asp?id=0");
tree.setXMLAutoLoading("./xml.asp");
tree.openAllItemsDynamic();
tree.openItemsDynamic(“0_1,0_1_1,0_1_1_1”,true)
…this will raise an error, because the initial tree is still loading!!!
How can I display the tree at a defined position after loading the page?
Thanks a lot and…
Happy New Year!
You can catch loading end event by using onXLE event of tree, or by next syntax
tree.loadXML(url,function(id){
//any code here
tree.openItemsDynamic(“0_1,0_1_1,0_1_1_1”,true)
});