Hi, thankyou very much for your assistance, but i am still trying to understand how to write the code. (My apology I am still very new to this)
You said you have to instantiate and show each tree using a different name.
I am using the sample file that come with .ZIP file.
Code: Select all
tree.put(1,'TreeMenu', 'main','eng/tree/treemenu.html', '', 'gif/tree.gif', 'gif/tree.gif' );
tree.add(0,' First steps', '', '', 'First steps to start', '', '' );
tree.add(1,' Preparations', 'main','eng/tree/preparations.html', 'Preparations for usage', '', '' );
tree.add(1,' Create instance', 'main','eng/tree/instance.html', 'Instance and settings', '', '' );
tree.add(1,' Menu items', 'main','eng/tree/items.html', 'How to create items', '', '' );
tree.add(1,' Show menu', 'main','eng/tree/show.html', 'How to show the menu', '', '' );
tree.add(1,' Select item', 'main','eng/tree/select.html', 'Selecting an item', '', '' );
tree.add(0,' Advanced', '', '', 'Advanced usage', '', '' );
tree.add(1,' Formats', 'main','eng/tree/formating.html', 'Format the items', '', '' );
tree.add(1,' Multilingual', 'main','eng/tree/multilingual.html', 'More than one language', '', '' );
tree.add(1,' Direct access', 'main','eng/tree/directaccess.html', 'Direct acces to a page', '', '' );
tree.add(0,' Update', 'main','eng/tree/update.html', 'How to update treemenu', '', '' );
tree.add(0,'Config', '', '', 'Configure the menu', 'gif/conf.gif', 'gif/conf.gif' );
tree.add(1,' Introduction', 'main','eng/conf/introduction.html', 'Overview of configuration', '', '' );
tree.add(1,' Usage', 'main','eng/conf/usage.html', 'To include and use with menu','', '' );
tree.add(1,'Use', '', '', 'Terms of usage', 'gif/openbook.gif', 'gif/openbook.gif' );
tree.add(1,' Liability', 'main','eng/use/liability.html', 'Liability of usage', 'gif/paragraph.gif','gif/paragraph.gif');
tree.add(1,' Copyright', 'main','eng/use/copyright.html', 'Copyright of the scripts', 'gif/copyright.gif','gif/copyright.gif');
tree.add(1,' Wishes', 'main','eng/use/wishes.html', 'Wishes to the users', 'gif/wishes.gif', 'gif/wishes.gif' );
var query = location.search; // query for direct-access
if (query) { // If there is a non-empty query
if (query.substr(0, 13)=="?treemenu,eng") tree.selectPath("eng/tree/treemenu.html"); // -> Preselect the appropriate
else if (query.substr(0, 17)=="?preparations,eng") tree.selectPath("eng/tree/preparations.html"); // page by giving the
else if (query.substr(0, 13)=="?instance,eng") tree.selectPath("eng/tree/instance.html"); // associated path
else if (query.substr(0, 10)=="?items,eng") tree.selectPath("eng/tree/items.html"); } //
document.write(tree);
//-->