openAllItemsDynamic

I want use openAllItemsDynamic.



When i use it as link it works:

Open item 100001



But if use it just in script:



tree=new dhtmlXTreeObject(“treeboxbox_tree”,“100%”,“100%”,0);

tree.setImagePath(“…/imgs/”);

tree.setXMLAutoLoadingBehaviour(“id”);

tree.setXMLAutoLoading(“xml_full.php”);

tree.enableSmartXMLParsing(true);

     tree.loadXML(“xml_full.php”);

            

     tree.openItemsDynamic(‘100001’,true);



openAllItemsDynamic doesn’t work and i see error: temp has no properties

a) In case of smartXMLParsing you can use openItem or openAllItems, openItemsDynamic and openAllItemsDynamic purposed for tree with dynamical loading
b) The loadXML is async operation, you need to call command only when data loaded

     tree.loadXML(“xml_full.php”,function(){
        // this code will be called after data loading
        tree.openItemsDynamic(‘100001’,true);

     });