| Author |
Message |
Andy
Joined: 07 Jul 2003 Posts: 8
|
Posted: Thu Jul 10, 2003 6:44 am Post subject: Reopen Tree |
|
|
Hi
If I reopen a tree, the comlepte tree I had selected before will open again (all Levels).
How can I manage that not the complete tree will open again?
(I only want to open the first level of subnodes)
Thanks
Andy |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Fri Jul 11, 2003 11:53 am Post subject: |
|
|
It looks like your initialization sequence has some code to expand all branches. Can you quote JavaScript code from your HTML page where tree is inserted?
Also, read this topic: Want to start with closed subtrees. Problem looks similar to yours. |
|
| Back to top |
|
 |
Andy
Joined: 07 Jul 2003 Posts: 8
|
Posted: Sat Jul 12, 2003 12:20 pm Post subject: |
|
|
I don't mean the state at the start of the site.
If I choose one tree, and then an other tree, the first tree closes (as it should be).
But if I reopen the first tree it will open with the state it had before I choosed another tree.
the last selected subnode will open again .... but I want only to open the first subnodes from this tree.
(sorry for bad english)
| Code: | <script language="JavaScript" src="lg_tree_format.js"></script>
<script language="JavaScript" src="lg_tree_nodes.php"></script>
<script language="JavaScript" src="js/cooltreepro.js"></script>
<script language="JavaScript">
var treename = "LGTree";
new COOLjsTreePRO (treename, LG_NODES, LG_TREE_FORMAT);
NTrees[treename].init();
</script> |
I think this code is ok ...... maybe something in the cooltreepro.js had to be changed ..... but what?
Greets
Andy |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Sat Jul 12, 2003 1:15 pm Post subject: |
|
|
| Looks like you want to reset all nodes to collapsed state when some branch gets collapsed. Am I right? |
|
| Back to top |
|
 |
Andy
Joined: 07 Jul 2003 Posts: 8
|
Posted: Thu Jul 17, 2003 10:55 am Post subject: |
|
|
Jepp .... think that's what I want
Is this possible?
Greets
Andy |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Thu Jul 17, 2003 8:33 pm Post subject: |
|
|
Yes, this is possible. But cooltreepro.js must be patched, and thus this topic must be reagganged as private conversation. Please contact technical support ( jssupport@cooldev.com ), and don't forget to include your Ref.No.
BTW, your initialization code is not portable. Eventually we can change NTrees to something (actually, it is window.CTrees now - version 2.3.1). You'd better write your code in the following way:
| Code: | <script language="JavaScript">
var treename = "LGTree";
var tree = new COOLjsTreePRO (treename, LG_NODES, LG_TREE_FORMAT);
tree.init();
</script> |
|
|
| Back to top |
|
 |
|