Hello,<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>
<o:p> </o:p>
Thanks for fix.
<o:p></o:p>
Preselected was my typo and I need previous selection.
<o:p> </o:p>
I have tree in �tree.html� page and my tree is:<o:p></o:p>
<o:p> </o:p>
Root<o:p></o:p>
� Level 1<o:p></o:p>
o Level 2<o:p></o:p>
� Details<o:p></o:p>
<o:p> </o:p>
When the user click on �Details� node, I will be redirecting to �details.html�. Next time, when the same user visits �tree.html�, �Details� node should be selected, Expanded and visible(as shown as above).<o:p></o:p>
<o:p> </o:p>
If the Details node ID is �abc123�, my function would be like :<o:p></o:p>
<o:p> </o:p>
function selectItem(){<o:p></o:p>
tree.selectItem(’ abc123’);<o:p></o:p>
}<o:p></o:p>
<o:p> </o:p>
The above function is working fine with any onClick call. But, I want to call this function when the tree is loading or right after loaded. <o:p></o:p>
<o:p> </o:p>
I tried various different options as shown below:<o:p></o:p>
<o:p> </o:p>
tree.loadJSON(“big_data.json”, selectItem());<o:p></o:p>
<o:p> </o:p>
tree.attachEvent(“load”, selectItem());<o:p></o:p>
<o:p> </o:p>
tree.selectItem(abc123’, false)<o:p></o:p>
<o:p></o:p>
I cannot use �select:1� in JSON, because this selection can be change at any point of the time depending on user privileges.
Hello,
there is an issue in the on xml loading end handler. Try to use
tree.loadJSON(“big_data.json”,selectItem);
instead of
tree.loadJSON(“big_data.json”,selectItem());