Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Shawn on Sep 08, 2008 20:46
open dhtmlx forum
setXMLAutoLoading and loadOpenStates

I just purchased our code and I am trying to get the tree mode to load the cookie when the XML is auto loaded. Here is my code so far:

tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
tree.setXMLAutoLoading("/core/xmlTree.php");
tree.loadXML("/core/xmlTree.php?id=1");


dhtmlxEvent(window, "load", function(){
window.setTimeout(function(){
tree.loadOpenStates('solodev');

tree.attachEvent("onOpenEnd",function(){
tree.saveOpenStates('solodev');
});
},100);});

Can someone please give me the right code to make this work.
Answer posted by Support on Sep 09, 2008 04:04
a) loadOpenStates need to be initiated after main XML loaded ( onXLE event or second param of loadXML command )
b) saveOpenStates called from onOpenEnd may block opening process.