Recent Questions
Q: Thanks, we tried giving var pressedItem=0; and the script as below:
<script type="text/javascript">
onload=setPressed;
function setPressed()
{
dm_ext_setPressedItem (0,8,0,0);
}
</script>
We are facing 2 problems
1) Two menus are getting highlighted, the "Home" and the dynamic html menu which is called onLoad using dm_ext_setPressedItem (0,8,0,0); function)
2) The submenu of the dm_ext_setPressedItem (0,8,0,0) is not getting highlighted.
A: Try to set
var pressedItem=-2;
dm_ext_setPressedItem function has a following parameters:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion, parentOpen)
So, if you want to highlight item in the submenu you should use itemInd of this item (notitemInd of the parent item).
For example you want to highlight submenu item of the 'Manage Users' parent item with
itemInd=15.
You can find more info about dynamic html menu indexes here:
http://deluxe-menu.com/highlighted-items-sample.html#ind
So you should write the function in the following way:
dm_ext_setPressedItem (0, 3, 15, 1, 1)
menuInd = 0 if you have only one menu on the page
submenuInd = 3, see how to determine submenuInd in the table
http://deluxe-menu.com/highlighted-items-sample.html#ind
itemInd = 15, see how to determine itemInd in the table
http://deluxe-menu.com/highlighted-items-sample.html#ind
recursion = 1, to highlight parent items
parentOpen = 1, to open the submenu with the selected item.Q: I currently have the menus set to show the selected item in white and the non-selected items in blue.
However, I can only choose one item in each menu.
Is there any way to choose multiple items from a single ajax drop down menu and have all of selected items show white? If so, what option do I need to enable for the ajax drop down menu?
Programmatically, I think it would be similar to something to:
dm_ext_setPressedItem (1,1,1);
dm_ext_setPressedItem (1,1,2);
A: No, Deluxe Menu doesn't has a feature to highlight multiple items now.
Actually you can use the following function:
function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)
You can create Individual Item Style with style of selected item andusing this function assign it for the items you want to highlight
dm_ext_changeItem(0, 0, 1, ["Deluxe Menu Info", "", "", "", "ajax drop down menu hint",,"1"]);
Q: Greetings. How do I make a menu item as default selected and open when the page loads with the dhtml menu bar script? Thanks.
A: Deluxe Menu has only two states normal and mouseover.
Try to do the following things:
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, forexample:
<noscript><a href="http://deluxe-menu.com">dhtml menu bar script 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=3;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
You can also set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a dhtml menu bar script 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.
Q: Do you support keyboard shortcuts (up/down through javascript for drop down menu)? I couldn't find an example of that.
Also, this one from OpenCube (exploding submenus) runs on Firefox too. No way to get that in yours?
A: No, Deluxe Menu doesn't support transitional effect in Firefox. Thereis no way to do it in the current version of the menu. It is possiblethat we'll add this feature in the next versions.
Deluxe Menu has keyboard support. You can check it on our website
http://deluxe-menu.com/
Press Ctrl+F2 to enter/switch to next menu on the page.
Arrow keys - navigate
Esc - exit the menu
Use the following parameter to enable keystrokes support:
var keystrokes = 1;
0 - disabled (default), 1 - enabled.
Use also the following parameters:
var dm_focus = 1; Show focus selection for selected item.
var dm_actKey = 113; Key code for keystrokes activation.
Works with Ctrl key only.
Default value is 113 = F2 key, 114 = F3 key, 115 = F4 key, etc.