padmapriya
Newbie
Posts: 1
Registered: 1/18/2005
Member Is Offline
|
| posted on 1/18/2005 at 06:43 AM |
|
|
How to add autoscroll feature to the tree
We have 1000's of items in the tree.Whenever we make a search in the tree, the particular item gets highlighted.
But most of the times it's not visible to the user.The user has to scroll to see the highlighted item.Is it possible to scroll the browser to a
positive relative to the highlighted item.
|
|
|
tedqn
Junior Member
Posts: 5
Registered: 9/1/2005
Member Is Offline
|
| posted on 9/2/2005 at 06:27 PM |
|
|
If you know the index of the first item found
you can do an autoscroll to it..
document.body.scrollTop = 15 * itemIndex
assuming each menu item is approx 15 pixels high... of course need careful calculations.
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 9/6/2005 at 09:02 AM |
|
|
Try to use focus() method of the object containing the item highlighted.
|
|
|