Board Logo

Select a node from a page
ajsaez - 6/22/2004 at 11:09 AM

I have a two frames web and a
i want select a node in the menu from a page.


rock - 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 - 6/25/2004 at 09:39 AM

IA?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 - 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 - 6/25/2004 at 09:54 AM

I donA?t understand, how can i do that??
Now, my call is:
parent.left.trees[1].select(45)


rock - 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.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/