Recent Questions Speed Javascript Nav Tree Load
Q: I can’t highlight the selected menu item of the current page in the javascript flyout menu?
A: Please, check the following parameter
var pressedItem=-2;
This parameter 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-menu.
The menu has only two states normal and mouseover. We'll try to add the pressed state in the future.
You can set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem.
You can't get this ID after you reload your page.
That is why you should write your own code on PHP.
You can also set the correct:
var pressedItem=1;
parameter on each html page.
Q: I just purchased deluxe menu and can't seem to figure out how to get a custom onMouseOver and onMouseOut event to work on a javascript drop down menu item.
Could you please detail how to do this?
A: Unfortunately, you can't assign onmouseover/onClick/onContextMenu event to each item.
However, you can achieve this by using standard html objects within javascript drop down menu items, for example:
var menuitems = [
["<div onContextMenu='your_code_here'>item text</div>", ""]
];
Q: Our company has been using the trial version of JavaScript Tree Menu and was satisfied enough with initial integration efforts to acquire the license version.
We are interested in making our main dhtml rollover menu items a constant width, but the data.js parameters ( var menuWidth="800px"; var menuHeight="30px"; var smWidth=""; var smHeight="";) don't seem to give us that capability. We dynamically remove main menu items based on user roles and when we do the main menu always re-sizes and the remaining main menu item widths no longer match our sub-menu widths. We're able to adjust for this by using the API but that seems to be a lot of unnecessary coding. If we could keep each main menu item a fixed width, our sub-menu widths would not have to change.
Do you have information on how to accomplish fixed main menu item widths, even better would be an example?
A: Actually you can specify the width and of all or individual dhtml rollover menu items or submenus usingIndividual Item/Submenu styles.
Q: I worked up some menus on my local machine and they work fine I want to push them to my server.
When I do, I don't see the menu that I saw on my local machine.
Instead, I see a hypertext link with a word that I used in one menu. What could be wrong?
Do I have to chmod the JS file? Do I have it mapped wrong. Is it because I am using a demo version?
A: Demo version of the menu has full functionality.
I can't find the call of dmenu.js file on deluxe-menu.htm and dmenu.js file in the "deluxe-menu_files" folder.
Please, upload this file on your server.
More info about the installation of the menu you can find here:
http://deluxe-menu.com/installation-info.html