set focus on tree view on load of page.


I havee seen the answer posted for - set focus on tree view on load of page.



The solution doesnot work in my scenario.



My usecase is like this:



tree is my dhtmlXTree object.



treebox_tree is my divId.



the property of div is overflow:hidden



I have implemented the same -



   tree.loadXML(“url”, function(){
                             treebox_tree.focusItem(’<bean:write name=“laborAllocationForm” property=“regionCode” />’);
                            })



Still unable to get focus on load of the page.



One more question how the focus is identified on screen.

One more question how the focus is identified on screen.
The scroll state of tree modified in such way, that the item in question moved to visible part of tree.

The full code may look as
    var id=some_id;
    tree.selectItem(id); // if you need to select item
    tree.openItem(id);  // if item stored inside closed branches, the command will open all necessary branches, so item will become visible
    tree.focusItem(id);  // if item need to be moved to visible part of grid