Recent Questions
Q: The menu doesn't show the drop down sub items. If you would look at the script there are two sublinks for Accommodation which however is not visible when we are doing a mouseover. I have attached the revised data.js file with this mail. Please let me know if thre is anything else hat i need to look into.
A: You should set back color for your submenus.
For example you should create style and assign it for the subitems:
var itemStyles = [
["itemBackColor=#61420A,#B77D13","itemBorderWidth=1","itemBorderStyle=solid,solid",,
"itemBorderColor=#3C2906,#3C2906"],//style0
];
["Accommodation","#", "", "", "", "", "", "", "", ],
["|test1 text text","", "", "", "", "", "0", "", "", ], //style0
["|test2 text text text text","", "", "", "", "", "0", "", "", ],//style0
You should also set the following parameters:
var itemAlign="left";
var subMenuVAlign="bottom";
Q: I know. I have two menus on the page and I am not using beforeItemImage orafterItemImage for the top menu in javascript (the one you referenced below), but I need it for the second menu. The parameters for that menu are in mainnav_data.js.
Even when I only call dmWorkPath and dmenu.js once, it does not work.
A: See, it is not correctly to use image-based items:
["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "0", "", "", "", "", ],
and specify beforeItemImage/afterItemImage parameters. They won't work in that case.
You can create such buttons in the following ways:
1) Use image-based menu (images with text).
Create normal and mouse-over state images (with text) for each item:
["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/new.gif", "mainnav_data.files/new2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/xxxxx.gif", "mainnav_data.files/xxxxx2.gif", "", "_self", "", "", "", "", "", ],
2) Use combined background for the menu in javascript items (images without text).
var beforeItemImage = [,]; //left-side image for normal and mouse over state
var itemBackImage = [,]; //background or image for normal and mouse over state
var afterItemImage = [,]; //right-side image for normal and mouse over state
var beforeItemImageW = '';
var afterItemImageW = '';
var beforeItemImageH = '';
var afterItemImageH ='';
But you should create a small images in any Graph Editor, for example:
button_n_back.gif
button_n_left.gif
button_n_right.gif
button_o_back.gif
button_o_left.gif
button_o_right.gif
You cannot use these two methods together!
Q: Could you please explain how to increase the height of our javascript menu submenu links to 18 or 20 px each?
A: You can create Individual submenu style and assign it to the firstitem in each submenu.
var menuStyles = [
["menuBackColor=transparent","menuBorderWidth=1","itemSpacing=1","itemPadding=0px 5px 0px 5px"],
["itemPadding=5px 2px 5px 2px"],
];
var menuItems = [
["Advanced Taser Guns","http://www.defenseproducts101.com/tasers.html", "", "", "", "", "0", "", "", "", "", ],
["|Advanced Taser Guns","http://www.defenseproducts101.com/tasers.html", "", "", "", "", "", "1", "", "", "", ], //assign style
Q: Is it possible to have menu items act like regular hyperlinks?
For instance in Firefox I like to "middle click" hyperlinks to open them in a new tab, or in IE right click and open in new window.
However with Deluxe-Menu this does not seem to work.
A: If you want to open your links in the new window you should set the item target parameter to "_blank", for example:
var menuItems = [
["Home","testlink.html", , , , "_blank", , , , ],
...
You can include also any html code in the Item Text.
For example:
["<a href='http://deluxe-menu.com/'>Home</a>","", , , , , , , , ],