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 

expandNode question

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



Joined: 28 Jun 2007
Posts: 2

PostPosted: Thu Jun 28, 2007 11:54 am    Post subject: expandNode question Reply with quote

I am evaluating CoolTree for purchase. I downloaded the free version and have a question. I am looking at the Graphically Rich sample named sample.php.html.

At initialization it uses:

var tree1 = new COOLjsTree("tree1", COOL_NODES, COOL_TREE_FORMAT);
tree1.expandNode(0);

And when the page loads, the first node opens. How do I change which node opens when the page loads? Shouldn't setting tree1.expandNode(0); to tree1.expandNode(1); open the next node? It does not.

Please explain how to selectively open a node when a page loads.

Thank you in advance.
Back to top
AlexKunin
Developer


Joined: 03 Jan 2003
Posts: 1191

PostPosted: Fri Jul 06, 2007 5:56 am    Post subject: Reply with quote

Explanations are here: http://javascript.cooldev.com/scripts/cooltree/demos/control/.
Back to top
webdept



Joined: 28 Jun 2007
Posts: 2

PostPosted: Fri Jul 06, 2007 12:21 pm    Post subject: Thanks Reply with quote

Thanks for your attempt to answer my question but your link does not provide the info I need to selectively open a node. I was hoping that a Cooldev developer monitored this forum and could provide specific details.
Back to top
AlexKunin
Developer


Joined: 03 Jan 2003
Posts: 1191

PostPosted: Fri Jul 06, 2007 12:31 pm    Post subject: Reply with quote

I am that developer (look into the script's code - I am the author of the current version). And that link contains paragraph that starts with "You can toggle specific node...". In COOLjsStandard all nodes initially are collapsed, and "toggle" actually means "expand".
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