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: expand single node...
amb_lew
Junior Member

Posts: 3
Registered: 12/23/2002
Member Is Offline
posted on 12/31/2002 at 02:52 PM Reply With Quote
expand single node...


hi all:
greenpea's "expand all" thread got me thinking...
has anybody come up with a way to expand a specific node from the content frame???
as an alternative navigation technique, i've got a page loading in the content frame that contains image map.
this image map links to some of the same pages as the tree. i'd like to be able to update the tree to keep it "synch"ed when the user clicks on a link from the content frame
THANXS!!!
amb
View User's Profile View All Posts By User U2U Member
Ulukai
Member

Posts: 40
Registered: 11/27/2002
Location: Frankfurt, Germany
Member Is Offline
posted on 1/6/2003 at 10:24 PM Reply With Quote

Well, I did a quick test. I found a solution to open a specific node via a link.
This solution does only open and does NOT CLOSE a node and you have to know the n_id of the node. This is because I don?t want to code the whole night through;P
But it may be an idea to be developed further.

You will have to add the following code:

In the constructor of tree add:

this.recursivetoggle = function(n_id) {var o_item = this.a_index[n_id]; if(o_item.o_parent!=this){o_item.recursiveopen(o_item.b_opened)}else{this.toggle(n_id);}}

in the constructor of tree_item add

this.recursiveopen = item_recopen;

after the constructor of tree_item or anywhere else add:

function item_recopen(b_close){
if(this.o_parent!=this.o_root){
this.o_parent.recursiveopen(b_close);
}
this.open(b_close);
}

To open a specific node via link add the following to your html-page:


toggle

or for example:

toggle

You will have to make sure that the trees array is known at the page where you place the link.

This is only an idea. To close the node you will have to walk through the parents of the item until you reach the direct child of root. This one has to be closed.
To determine the id of an item you may create a lookuptable which is generated when the tree is built. This would contain key - value pairs with the n_id and for example the displayed text or any other identification.
I hope it works,

have fun

Ulukai
View User's Profile View All Posts By User U2U Member
amb_lew
Junior Member

Posts: 3
Registered: 12/23/2002
Member Is Offline
smile.gif posted on 1/9/2003 at 11:48 AM Reply With Quote
thanks for the idea....


Ulukai:
THANKS for the great idea...i'll give it a shot and post results...
i'm thinking i'll do a " close all" and then follow your suggestion to open a single one. this should simplify the case when the user clicks on a second link in the image map
THANXS!!!
amb
View User's Profile View All Posts By User U2U Member
Stephen Benson
Junior Member

Posts: 7
Registered: 12/24/2002
Member Is Offline
posted on 1/15/2003 at 03:58 PM Reply With Quote
How did it go?


I'm about to have a try at it, so if you had any luck and some code to post, please do.
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