JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reopen Tree

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree
Author Message
Andy



Joined: 07 Jul 2003
Posts: 8

PostPosted: Thu Jul 10, 2003 6:44 am    Post subject: Reopen Tree Reply with quote

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

PostPosted: Fri Jul 11, 2003 11:53 am    Post subject: Reply with quote

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

PostPosted: Sat Jul 12, 2003 12:20 pm    Post subject: Reply with quote

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) Wink

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

PostPosted: Sat Jul 12, 2003 1:15 pm    Post subject: Reply with quote

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

PostPosted: Thu Jul 17, 2003 10:55 am    Post subject: Reply with quote

Jepp .... think that's what I want Wink
Is this possible?

Greets
Andy
Back to top
AlexKunin
Developer


Joined: 03 Jan 2003
Posts: 1191

PostPosted: Thu Jul 17, 2003 8:33 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree All times are GMT
Page 1 of 1