Recent Questions
Q: We have a query on a navigation that we have created. We would like to knowhowto set the colour for a nav item of the asp drop down menu if any pages in that section are currently being visited?
A: To save your navigation path you should set the following parameter:
var saveNavigationPath = 1;
The menu keeps items highlighted during menu navigation.
0 - disabled, 1 - enabled (default).
You can highlight menu items by default in two ways:
1) Set the pressed item on each page idividually using the following parameter:
var pressedItem = -2;
The toggle mode. Sets an index of an item that will be highlighted by default.
-2 - the toggle mode is disabled;
-1 - the toggle mode is enabled, but no items highlighted by default;
0,1,2,3,... - index of highlighted item in a top-level menu.
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, for example:
<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>
<script type="text/javascript"> var pressedItem=2;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
2) Set the pressed item/subitem using dm_ext_setPressedItem () function.
Please see more info here:
http://deluxe-menu.com/highlighted-items-sample.htmlQ: I am using JavaScript Deluxe Menu v3.1 and have some problem with the doctype declaration. If I use the declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
the menuBackImage and itemBackImage images do not display properly. Check with and without doctype declaration. Is there a known fix for this?
A: You should specify units in "px" for the javascript menu object.
var itemPadding="15px 10px 0px 20px";
var menuStyles = [
["smColumns=2","itemPadding=25px 10px 10px 10px"],
["itemPadding=25px 10px 10px 20px"],
["menuBackImage=img/nahbp_1.gif","itemPadding=25px 10px 10px 20px"],
];
Q: My site requires me to regularly update the drop down menu by inserting a new item at the top of the list.
A: Add items using the following function:
function dm_ext_addItemPos (menuInd, submenuInd, iParams, Pos)
Adds the new item to a submenu.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
iParams = [array] - the array of item parameters.
This parameter has the same structure as an item in menuItems array.
You can assign parameters of another existent item of the menu
(for example, when you want to create a duplicate of the existent item) or create new ones.
Structure of iParams:
[item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]
Pos - the position in the menu where you want to add new item.
Find more info:
http://deluxe-menu.com/functions-info.htmlQ: I can not figure out how to fix the menu from going off the page inMozilla by using html code. I don't know where to put the code. I would likeit to be flush right.
A: Try to set exact width for the menu width and menu height, try to specify unitsin "px":
var menuWidth="500px";
It's necessary to specify exact value for Mozilla browsers. It helpsto position menus correctly.
var menuHeight="20px";
You should also check your padding parameter, you should write it so:
var itemPadding="1px 1px 1px 12px";