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: Cannot expand to a certain node on page load
rgravel70
Junior Member

Posts: 3
Registered: 10/30/2007
Location: Montreal, QC
Member Is Offline
posted on 10/30/2007 at 06:01 PM Reply With Quote
Cannot expand to a certain node on page load


Hi,

I'm having a hard time trying to expand to a certain node on page load. I use Tigra Tree Menu Pro 1.3.

Here's my code:

new tree (TREE_ITEMS, tree_tpl, "TheTree");
var o_tree = (TREES['TheTree']);
var a_item = o_tree.find_item_by_key('structureID',898);
for(var n=0; n < a_item.length; n++) {
o_item=a_item[n];

var n_id = o_item.n_id
var n_depth = o_item.n_depth
var a_index = o_item.o_root.a_index
var a_parents = [o_item];

while (n_depth) {
if (a_index[n_id].n_depth < n_depth) {
a_parents[a_parents.length] = a_index[n_id];
n_depth--;
}
n_id--;
}

for (var i = a_parents.length-1; i >= 0; i--) {
if (a_parents.n_state & 48) {
a_parents.open();
}
}

o_tree.select(a_item[0].n_id);
}

Everything seems to be fine until it comes to the line with "a_parents.n_state & 48". It keep saying "undefined".

What does 48 means? I found this example on SoftComplex site.

If, instead of looking for the key containing my index "898", I put "2", it works because it don't have to open subfolders.

What do I do wrong?

See my tree_items_e.js file attached.

Thanks

Robert

Attachment: tree_items_e.js (57.19kb)
This file has been downloaded 632 times
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/31/2007 at 12:53 AM Reply With Quote

there is a working sample for similar situation in the product documentation. consider using it instead.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Tigra Tree Menu
Product Demonstrations Live Demos:
Frames targeting
Win help style
Free Download Free Download
Free Download Menu Builders
Online Builder
Product Documentation Documentation:
Documenation Page
Support Forum Technical Support
Support Forum
   
Tigra Tree Menu PRO
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