Board Logo

Calling focus on specific branch/leaf?
jsuen - 1/18/2007 at 07:05 PM


I was just wondering if it was possible in Tree Menu Pro to call the focus() method on a specific node (leaf/branch).
Following on from my previous thread, if I call o_item.focus() nothing seems to happen? The method code is attached, thanks.



tigra - 1/19/2007 at 02:33 PM

There is no such method in o_item object. What is that you try to achieve anyway?

jsuen - 1/23/2007 at 09:53 PM


I was trying to have a found entry within the Tigra tree to be the set focus for a user's browser window (or frame). I am aware of the Javascript focus() method and had hoped to achieve something similar to this, i.e.


<script type="text/javascript">

We have achieved this in our previous navigation tree technology by splitting a document body into an array of anchor tags and calling focus() on one particular array item.
Would this still be achievable within the Tigra tree menus?



tigra - 1/24/2007 at 10:02 AM

In tree there anchor tags sit inside the <TD> tags with unique ID for each tree item. Here is the naming convention:

id="t' + o_item.o_root.n_id + '_' + o_item.n_id + '"

this means that the id of the first element of the first tree is t0_0
you can use this information to access the anchor tag of a particular tree item.

Back to forum: