zombie
Junior Member
Posts: 3
Registered: 12/2/2004
Member Is Offline
|
| posted on 12/2/2004 at 06:12 PM |
|
|
Programmatically selecting or opening a node
I know this question was addressed earlier in the forum but I ma not clear.
In my case I have folderids and names for the entire tree structure. Is it possible to to select or open a node without manually clicking on it?
''set the node's id to this folder id so that I can use your code
var o_item = mytree.a_index[folderid];
o_item.open();''
I appreciate your response.
|
|
|
zombie
Junior Member
Posts: 3
Registered: 12/2/2004
Member Is Offline
|
| posted on 12/2/2004 at 07:34 PM |
|
|
Programmatically selecting or opening a node
Actually, another point on this same question is I tries your technique where we pass the index 0, 1, 2...etc for the different tree items to select a
node programmatically. It works fine as long as the target node's depth is either 0 or 1 . If the node is any depper than 1, it will not select
the node, it gives the following error message.
"style is null or not an object."
This error occurs on the line 114.
get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold';
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/3/2004 at 10:49 AM |
|
|
To select items in depth>1 you should open its parents before.
|
|
|
tdodds
Junior Member
Posts: 3
Registered: 1/13/2005
Location: Pittsburgh, PA
Member Is Offline
|
| posted on 2/8/2005 at 01:59 PM |
|
|
How do we reference the parent?
I've tried o_parent and a few other attemps...
Any help appreciated.
|
|
|