Recent Questions Jquery Menu Tree Xml
Q: How do I change the background color for the floating drop down menu
A: To change menu colors you should change the following parameters:
var menuBackColor="#F2F3F2";
var itemBackColor=["#F2F3F2","#535353"];
You can also use Individual Item Styles to change the color of the specific items:
var menuStyles = [
["menuBackColor=#F2F3F2"],
];
var itemStyles = [
["itemBackColor=#F2F3F2,#535353"],
];
Q: The spacing between each item of the top horizontal dropdown menu is uneven but I don't know why.
If you highlight them all it becomes more obvious.
It is almost as if the space after a 2 word link is twice the space after a one word link or else the total space after each link is related to the number of letters in the link.
For example the space after 'Discounts' is greater than the space after 'Home' but the space after 'Envelope Printing' is even greater.
A: You can try to set the following horizontal dropdown menu parameters:
var menuWidth="";
var itemPadding="0px 10px 0px 10px";
Q: Is it possible to use an external file with these applets? Have tried
<SCRIPT LANGUAGE="JavaScript" SRC="myscript.js">
</SCRIPT>
but it does not work!
Any suggestions? I have one site with many pages, it would be handy not to have to change 20 pages just to modify one link.
A: You can use "menuItemsFile" param, example
<param name="menuItemsFile" value="menu1.txt">
The menu menu items are in menu1.txt, so you'll need to changeonly this menu1.txt if it necessary to add/remove/change items.
See also example:
http://www.apycom.com/xp-drop-down-menu/ex2.html
Q: I've now begun to offer my clients multiple levels offunctionality. Is there any way to add another level of complexity to the php drop down menu? Would AJAX Menus be the best approach for doing this?
A: You can do it in three ways now.
1) You can use API functions to generate items dynamically:
function dm_ext_createSubmenu (menuInd, submenuInd, itemInd, iParams)
function dm_ext_addItem (menuInd, submenuInd, iParams)
See more info:
http://deluxe-menu.com/functions-info.html
2) Use AJAX feature and create different .js files depend on company and user level.
3) Generate your menu items dynamically from database.
Unfortunately we don't have working example with ASP.
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) 2008, 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.)
];
The example of the menu working with PHP/MYSQL you can find here:
http://deluxe-menu.com/rq-loading-bar-MySQL-support.html