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: Collapse all -> Stack overflow
pwallin
Newbie

Posts: 1
Registered: 11/15/2005
Member Is Offline
posted on 11/15/2005 at 03:54 PM Reply With Quote
Collapse all -> Stack overflow


Hi,
I get stack javascript error stack overflow when I try to collapse all after the current node.
When I collapse all before the current node it works fine, but not when I try to collapse the ones after the current.
I want to have everything collapsed except the one I click and its parents.
I'm not using PRO and prefer not to...

The code I'm using is this:

var o_closediv;

/* Collapse before current (working) */
for(var i = this.n_id-1; i > this.o_parent.n_id; i--)
{
trees[this.o_root.n_id].toggle(i);
o_closediv = get_element('i_div' + this.o_root.n_id + '_' + i);
if (o_closediv)
if(o_closediv.style.display != 'none'){
trees[this.o_root.n_id].toggle(i);
}
}


/* Collapse after current (not working)*/
for(var i = this.n_id+1; i < trees[0].a_index.length; i++)
{
o_closediv = get_element('i_div' + this.o_root.n_id + '_' + i);
if (o_closediv)
if(o_closediv.style.display != 'none'){
trees[this.o_root.n_id].toggle(i);
}
}
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 11/21/2005 at 11:28 AM Reply With Quote

Dont sure what cause your porblem, just few hints:
1. Try to use b_opened property of tree item instead checking display status.
2. Use open method of tree item instead of toggle method of tree object: o_item.open(1) - to close item, o_item.open() - to open item.
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