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/Collapse All Functions
senojeel
Junior Member

Posts: 4
Registered: 5/18/2005
Location: Indianapolis, IN
Member Is Offline
posted on 5/24/2005 at 10:23 PM Reply With Quote
Expand/Collapse All Functions


I am trying to use the API example of the Expand/Collapse functions. I placed the functions code into the tree.js file and I placed the call samples in the html after my <script>new tree....</script> When I try to expand or collapse, I get "Tree is not initialized yet." I am pasting the code without any changes. Do I need to change something so it will see my tree?

BTW, I am using the latest Pro version.

Thanks for your help!

Shawm
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 5/25/2005 at 10:23 AM Reply With Quote

First of all there is no need to modify original tree.js file (it's not allowed by license agreement), you could link the extra code by including it to other files (tree_items.js, tree_tpl.js, etc.)
how does your tree constructor looks like (new tree....) ?
please provide full line.
View User's Profile View All Posts By User U2U Member
senojeel
Junior Member

Posts: 4
Registered: 5/18/2005
Location: Indianapolis, IN
Member Is Offline
posted on 5/25/2005 at 05:38 PM Reply With Quote

For the time being, I have moved the functions into the items file.

Here is the code I think you were referring to.


<script language="JavaScript">
<!--//
new tree (TREE_ITEMS, TREE_TPL, 'FITS_Tree');
//-->
</script>

After that is where I have the links for expand/collapse.

<a href="javascript:expand_all(0,1)">Expand All</a> |
<a href="javascript:collapse_all(0,1)">Collapse All</a>
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 5/26/2005 at 03:08 PM Reply With Quote

As your tree is named ('FITS_Tree') the correct usage is:

<a href="javascript:expand_all('FITS_Tree',1)">Expand All</a> |
<a href="javascript:collapse_all('FITS_Tree',1)">Collapse All</a>
View User's Profile View All Posts By User U2U Member
senojeel
Junior Member

Posts: 4
Registered: 5/18/2005
Location: Indianapolis, IN
Member Is Offline
posted on 5/26/2005 at 04:10 PM Reply With Quote

Thanks Rock, you're awesome!
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