Html Tree Menu Sample Code by Deluxe-Tree.com
Html Tree Menu Sample Code


Buy Now!  Free Trial Download

Menu Screenshots Html Tree Menu Sample Code

Html Tree Menu Sample Code Tree Menu Samples

Features Html Tree Menu Sample Code

Easy Setup
  • De Luxe Tuner. GUI interface to create your html tree menu sample code menus easily and in no time
  • Sensible menu parameters for manual editing
Seamless Integration
  • Visible over flash, select boxes, iframes, java applets
  • Multiple menus on the same page
  • Amicable to other scripts and css styles
  • Any HTML code can be used inside menu items
Tree Menu Array Html Tree Menu Sample Code
Compatibility              
  • Full cross-browser compatibility including IE, Netscape, Mozilla, Opera, Firefox, Konqueror and Safari on Windows, Mac OS and Linux
  • Menu can be populated from a database using ASP, PHP, etc.
  • Search engine friendly
  • Support for any doctypes
  • Fits for secure sites
High Performance
  • AJAX menu loading - loads web menu data from the server "on-the-fly".
  • Commonly loads quicker than other html page elements
  • Runs well with an unlimited number of submenus and items
Professional Look-n-feel
  • Entirely customizable look-n-feel
  • A lot of pre-designed html tree menu sample code samples
  • Hundreds of visual effects
  • Custom CSS styles can be applied for all menu settings
Buy Now!  Free Trial Download

Javascript Tree Menu. Expandable Menu.

  • Good navigation system is an important part of web site success. If people can't find their way around the site, they will rapidly give up looking and go, never to return. So, it's very significant that your website has a neat, fast, and gratifying to the eye navigation.
    Don't permit your web site visitors to get lost. Try Javascript/DHTML Tree!

Recent Questions Html Tree Menu Sample Code

Q: Do I need to replace the menudir/ in the code with the name of the folder I have placed the .js files?


A: Yes, you should change the name of the folder.

If you have, for example such file structure:

deluxe-menu_files/
    dmenu.js
    data.js
images/
html_pages/
    page1.html
    page2.html

index.html

So, you should install your menu in the following way:
<head>
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript">  var dmWorkPath = "deluxe-menu_files/";</script>
<script type="text/javascript" src="deluxe-menu_files/dmenu.js"></script>
<!-- (c) 2006, http://deluxe-menu.com -->
</head>

<body>
<script type="text/javascript" src="deluxe-menu_files/data.js"></script>
</body>
</span>

Q: Is there a way to programmatical select an item in the scrolling menu without the user actual click on the item?

A: You can set a pressed item using Javascript API:

function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)

Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.

But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem.
You can't get this ID after you reload your page. That is why you should write your own code on PHP.




Q: I would like to know if I can use JavaScript Tree Menu to create pulldown menus on a Mac (Mac OSX). Thank you.


A: To create your menu on MAC you can use HTML version of Deluxe Tuner (for MAC OS). You can find it here:

http://deluxe-menu.com/deluxe-tuner-info.html


Q:  1) is it possible to have multiple(different) images, popup menus?

 2) Can it Automatically popup instead of Left click?
 Would you show me How?

  3) What is: menuInd - index of the javascript menu script on a page, >= 0 ?
 Could you give more explanation?

A: >  1) is it possible to have multiple(different) images, popup menus?
Yes, you can use any number of popup menus on your page.

>  2) Can it Automatically popup instead of Left click?
>  Would you show me How?
You can use onMouseOver event instead of onClick or onContextMenu events in that case.

> 3) What is: menuInd - index of the javascript menu script on a page, >= 0 ?
Each menu has ID. The ID's number starts with 0.

So, when you have several data files on your page you have such ID's:

<script type="text/javascript" language="JavaScript1.2" src="menu-top.js"></script> // ID - 0 //standard menu (doesn't use popup feature)

<script type="text/javascript" language="JavaScript1.2" src="source_pop.js"></script> // ID - 1

<script type="text/javascript" language="JavaScript1.2" src="source_pop1.js"></script> // ID - 2

<script type="text/javascript" language="JavaScript1.2" src="source_pop2.js"></script> // ID - 3

<script type="text/javascript" language="JavaScript1.2" src="source_pop3.js"></script> // ID - 4

and so on.

If you want to have different Popup menus (there color, item, text,font and so on) you should create different .js files with yourparameters. And call them from your page, for example:

<script type="text/javascript" language="JavaScript1.2" src="menu-top.js"></script>

<SCRIPT language=JavaScript1.2 src="source_pop.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript1.2 src="source_pop1.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript1.2 src="source_pop2.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript1.2 src="source_pop3.js" type=text/javascript></SCRIPT>

If you have different item text only you can use one
<SCRIPT language=JavaScript1.2 src="source_pop.js" type=text/javascript></SCRIPT>
file. But you should delete the following code:

  var menuItems = [

["Next","testlink.htm"],
["Prev","testlink.htm"],
["Close","testlink.htm"],
];

dm_init();

and move it to the html page:

<body>
...
<SCRIPT language=JavaScript1.2 src="source_pop.js" type=text/javascript></SCRIPT>
<script type="text/javascript"> //first popup menu ID - 1
  var menuItems = [

["Next","testlink.htm"],
["Prev","testlink.htm"],
["Close","testlink.htm"],
];

dm_init();
</SCRIPT>
<script type="text/javascript"> //second popup menu ID - 2
  var menuItems = [

["Text","testlink.htm"],
["Text1","testlink.htm"],
["Text2","testlink.htm"],
];

dm_init();
</SCRIPT>
<script type="text/javascript"> //third popup menu ID - 3
  var menuItems = [

["New_Text","testlink.htm"],
["New_Text1","testlink.htm"],
["New_Text2","testlink.htm"],
];

dm_init();
</SCRIPT>

<script type="text/javascript"> //fourth popup menu ID - 4
  var menuItems = [

["New","testlink.htm"],
["New","testlink.htm"],
["New","testlink.htm"],
];

dm_init();
</SCRIPT>

<img src="testimage.gif" width=200 onClick="return dm_popup(1, 1000, event);" style="cursor: hand;">
<img src="testimage.gif" width=200 onClick="return dm_popup(2, 1000, event);" style="cursor: hand;">
<img src="testimage.gif" width=200 onClick="return dm_popup(3, 1000, event);" style="cursor: hand;">
<img src="testimage.gif" width=200 onClick="return dm_popup(4, 1000, event);" style="cursor: hand;">

</body>