Categories | Question details Back To List | ||
Previous selection in Tree Hello, Thanks for fix. Preselected was my typo and I need previous selection. I have tree in ‘tree.html’ page and my tree is: Root · Level 1 o Level 2 § Details 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). If the Details node ID is ‘abc123’, my function would be like : function selectItem(){ tree.selectItem(' abc123'); } 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. I tried various different options as shown below: tree.loadJSON("big_data.json", selectItem()); tree.attachEvent("load", selectItem()); tree.selectItem(abc123', false) I cannot use ‘select:1’ in JSON, because this selection can be change at any point of the time depending on user privileges. Answer posted by Alex (support) on Nov 20, 2009 01:40 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()); |