ajsaez
Junior Member
Posts: 3
Registered: 6/22/2004
Member Is Offline
|
| posted on 6/22/2004 at 11:09 AM |
|
|
Select a node from a page
I have a two frames web and a
i want select a node in the menu from a page.
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 6/22/2004 at 11:59 AM |
|
|
parent.my_frame_name.trees[tn].select(in);
my_frame_name - name of frame with tree
tn - index of tree object
in - index of item in the tree
|
|
|
ajsaez
Junior Member
Posts: 3
Registered: 6/22/2004
Member Is Offline
|
| posted on 6/25/2004 at 09:39 AM |
|
|
I have the next problem
I´ve tried it but i have this error:
Line 102: 'style' is null or is not an object
The line with error is:
get_element('top.left.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 6/25/2004 at 09:49 AM |
|
|
The reason is that the item you trying to select is not rendered at the page yet. So You shoud open its parent item and so on recursively.
|
|
|
ajsaez
Junior Member
Posts: 3
Registered: 6/22/2004
Member Is Offline
|
| posted on 6/25/2004 at 09:54 AM |
|
|
I don´t understand, how can i do that??
Now, my call is:
parent.left.trees[1].select(45)
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 6/25/2004 at 10:31 AM |
|
|
If item has not been displayed at the page yet you should force it to be displayed before select it. To do this you should open
all parent nodes of the item.
Each item has o_parent property, so you could collect all item's parents within an array and then call their open
methods starting from the root item.
|
|
|