Recent Questions
Q: I have the dynamic dropdown menu working perfectly on the main page of the website, but when I try to install it onto html files that appear in subfolders of the site, the images do not appear. I have put ../ before all the links I can find and have the following codes placed in my file, what am I doing wrong?
A: You can use additional parameters to make dynamic dropdown menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
These parameters allow to make images and links paths absolute.For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
var menuItems = [
["text", "index.html", "icon1.gif", "icon2.gif"],
];
So, link path will be look so:
http://domain.com/pages/index.html
Images paths will be look so:
http://domain.com/images/icon1.gif
http://domain.com/images/icon2.gif
Please, try to use these parameters.
Q: Do you have an extremely simple example of modifying a dynamic drop down menus with the JavaScript API? I've played with the example on the site, but I have trouble removing the other menus without breaking it.
I just want to use the API to change the icon on the menu items.
A: You should use the following function:
function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)
<script language="javascript" >
dm_ext_changeItem(0, 0, 1, ["", "", "new_icon.gif", "new_icon_o.gif", "",,""]);
</script>
http://deluxe-menu.com/dynamic-functions-sample.htmlQ: I just noticed as well that I cannot change the spacing of the buttons.
Right now the buttons are tight together, how do I create a gap between each dhtmlmenu button?
A: You can paste the separator.
Please, see the following parameters:
//------- Separators -------
var separatorWidth = "10";
var separatorHeight = "20";
var separatorAlignment = "center";
var separatorImage = "C";
var separatorVWidth = "150";
var separatorVHeight = "10%";
var separatorVImage = "image.jpg";
You can create separators using menuItems, for example:
var menuItems = [
["item 1"],
["-"], // this item is separator
["item 2"],
];
You can also use this parameter:
var itemPadding = "4px";
You can also set multiple values, for example:
"2px 15px 5px 5px";
(top, right, bottom, left)
Q: Where in the interface is there an area to make a tab selected or not for the div tab menu?
A: You should see the following parameters:
Top items
var bselectedItem=1; //--- Common
Submenus
var bselectedSmItem=10; //--- Tab-mode