Recent Questions Sliding Treeview
Q: Is there a way to center button names because by default they are left justified?
A: Try to set the following parameters:
var itemAlignTop="center"; // text alignment for the top items
var itemAlign="center"; // text alignment for the submenus
Q: Can data be loaded dynamically?
For example, can your dhtml menu source code load the child of a node once the node is clicked on?
A: You can use AJAX like technology.
http://deluxe-menu.com/ajax-technology-menu-sample.html
You may generate a menu from a database or XML using any server-side script, e.g., PHP, ASP, VB, etc.
However, these scripts don't work inside of Javascript .js files, so, you should move parameters of a menu from a .js file into an html-page, e.g.:
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<!-- (c) 2006, http://deluxe-menu.com -->
<script type="text/javascript" language="JavaScript1.2">
// and describe parameters of a menu
var parameter1=value1;
var parameter2=value2;
etc.
var menuItems = [
// here you generate items using server-side scripts (php, asp, vb, etc.)
];
</script>
The example of the menu working with PHP/MYSQL you can find here:
http://deluxe-menu.com/rq-loading-bar-MySQL-support.html
Q: .How customizable is it style in for dhtml navigation, meaning, i have images i want used for the top level navigation, and background images for the rest. any way I can achieve this?
A: Actually you can create any menu with JavaScript Tree Menu. You can use Individual Styles tocreate your menu.
For example:
var itemStyles = [
["itemWidth=92px","itemHeight=21px","itemBorderWidth=0","fontStyle=normal 11px Tahoma",
"fontColor=#FFFFFF,#FFFFFF","itemBackImage=data-vista-03.files/btn_magentablack.gif,data-vista-03.files/btn_magenta.gif"],
];
var menuStyles = [
["menuBackColor=transparent","menuBackImage=back.gif","menuBorderWidth=0","itemSpacing=1","itemPadding=0px 5px 0px 5px"],
];
Q: Is it possible, for instance, to call dm_init multiple times in the list menu java? If so, do you have an example?
A: Yes, you can call dm_init(); function multiple times (for example youcan call several data files, or move menuItems array and dm_init();function into your page directly) to have multiple menus on your page.