Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Initial Open State
gbergman
Junior Member

Posts: 3
Registered: 9/28/2008
Member Is Offline
posted on 9/28/2008 at 06:11 PM
Initial Open State


We use a different Tree Menu Pro in each "section" of our website navigation. When clicking to a page in a different section we would like the tree to be opened to that page.

i.e. can we code an "onload" function to open the tree to a specific location?
(having the page open the tree when the page was not opened by clicking it's own tree item)

Also, is there a way to tell if the tree is in a "collapsed" state?
Thanks,
Gary
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 10/6/2008 at 07:52 PM

one way is to set 'st' key in the items file to tell the tree what is the initial state of the particular node.
another way is to open/close nodes of the loaded tree in the browser using the API (see documentation for info and samples)
View User's Profile View All Posts By User U2U Member
gbergman
Junior Member

Posts: 3
Registered: 9/28/2008
Member Is Offline
posted on 10/9/2008 at 04:19 AM

Ok, I coded an "OnLoad" statement that first collapses the tree and then opens it to the current item.
(using function openItemByCaption).
But the opened tree is not "selected".
What statement do I have to add (I assume between the following points) that will
put the found item into a "selected or Opened" state so that my CSS code will highlight it?


o_item=a_item[n];

How to place "0_item" in an "opened" state?

// collect info about all item's parents
var n_id = o_item.n_id,

Thanks,
Gary

(My programming experience is S/390 Assembler. Trying to understand this high-level stuff)
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 10/9/2008 at 04:25 AM

Call o_item.select()

If you like assembler you'll enjoy the bitmaps and bit operations in the tree menu (not typical for JavaScripts)
View User's Profile View All Posts By User U2U Member
gbergman
Junior Member

Posts: 3
Registered: 9/28/2008
Member Is Offline
posted on 10/9/2008 at 06:34 PM

Problem solved, thanks.

Some trial & error showed that

1. o_item.select(); - needed to be at end of function, not in middle where I thought.

2. The tree item definition, needs to have a 3rd parameter defined (even if null)


Syntax, why not? They tax everything else.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004