Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by MartinJ on Mar 31, 2008 00:24
open dhtmlx forum
openAllItemsDynamic

I want use openAllItemsDynamic.

When i use it as link it works:
<a href="javascript:void(0)" onclick="tree.openItemsDynamic('100001',true)">Open item 100001</a>

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
Answer posted by Support on Mar 31, 2008 03:12
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);
     });