Recent Questions
Q: I have one final question:-
If you go to http://domain.com/mainboard.asp
And click the tools icon.
My application has 3 types of settings.
Click the line icon (which highlights) then you can use the line tool Then click the thickness icon (which only changes the thickness of the line) And then click the colour icon (which only changes the colour of the line)
Unfortunately, when another icon is selected it resets the original icon.
Is there a way to show one of the top 8 function icons highlighted as well as the selected thickness icon and palette icon all in a selected state together?
A: function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)
Changes parameters and an appearance of the item.
menuInd - index of a dropdown javascript menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0. See more info about indexes here.
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 themenu or create new ones.
Structure of iParams:
[item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]
You should change icon_normal, icon_over parameters for the items.
http://deluxe-menu.com/functions-info.htmlQ: 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.
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: May I can use PHP code in menu items of my dhtml website navigation menu?
A: You may generate a menu from a database or XML using any server-side script, e.g., PHP, ASP, VB, etc.
However, these scripts don't work inside of Javascript .js files, so, you should move parameters of a menu from a .js file into an html-page, e.g.:
<!-- Deluxe Menu -->
<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>
<!-- (c) 2006, http://deluxe-menu.com -->
<script type="text/javascript" language="JavaScript1.2">
// and describe parameters of a menu
var parameter1=value1;
var parameter2=value2;
etc.
var menuItems = [
// here you generate items using server-side scripts (php, asp, vb, etc.)
];
</script>
The example of the menu working with PHP/MYSQL you can find here:
http://deluxe-menu.com/rq-loading-bar-MySQL-support.html