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 

Cannot generated 2 menus on same page.

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



Joined: 30 Jun 2004
Posts: 3

PostPosted: Wed Jun 30, 2004 12:35 pm    Post subject: Cannot generated 2 menus on same page. Reply with quote

Recently my colleague posted a message relating to getting the COOLjsTree to generate within a table cell. See http://javascript.cooldev.com/forum/viewtopic.php?p=2096

I managed to get this to work by calling the RedrawAllTrees command at the bottom of the page.

http://www.aerodata.co.uk/newtree/newtree2.htm

Note the JavaScript tree structure appears within the page because I will be generating it dynamically using ASP.

Now, the problem I have is that I would like another menu to appear on the same page but on the right side. I have created the following page:

http://www.aerodata.co.uk/newtree/newtree3.htm

As you can see, none of the menus appear. I made sure that I created 2 different tree variables. Am I doing something wrong or does COOLjsTree not support multiple tree menus on the same page?

Thanks

Vince
Back to top
surfocracy



Joined: 30 Jun 2004
Posts: 3

PostPosted: Thu Jul 01, 2004 12:38 pm    Post subject: Reply with quote

Can anyone in support provide some feedback? This is rather urgent.

Thanks
Back to top
AlexKunin
Developer


Joined: 03 Jan 2003
Posts: 1191

PostPosted: Fri Jul 02, 2004 5:34 pm    Post subject: Reply with quote

Every tree on the page must have unique name. So, just change "newtree" to "newtreeright" (second initialization sequence):
Code:
var myNewTreeRight = new COOLjsTreePRO ("newtreeright", NEWTREE_NODES_RIGHT, NEWTREE_FORMAT);
myNewTreeRight.init();
Back to top
surfocracy



Joined: 30 Jun 2004
Posts: 3

PostPosted: Fri Jul 02, 2004 5:45 pm    Post subject: Reply with quote

Great, thanks a lot for that. I have made the changes to the following new file:

http://www.aerodata.co.uk/newtree/newtree4.htm

Vince
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