Recent Questions
Q: If need to make changes do I need to replace all the files and folder and script in all the web pages? Or are there just one or two files that need to be replaced? Which files or folders?
A: You need to change only your data.js (by default) file. It is thefile with your menu parameters.
Then you should upload this file on your server and may be add somenew images. That is all.
Q: How do your users normally indicate which page a web visitor is on, by using your navigation bar submenu?
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, for
example:
<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>
<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 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.
Q: Is it possible to insert a dhtml foldout menu item at the top of the submenu? For example, if a dhtml foldout menu is defined as:
var menuItems = [
["Search","","","","","","1","0"],
["|Residential","srch.php","","","","","0"],
["|VacantLand","srch.php?cri","","","","","0"],
["|Commercial/Industrial","srch.php","","","","","0"]];
How can I add a new item above “Residential?” I’ve tried the following with no luck — the forth argument does not seem to be used:
dm_ext_addItem(0, 1, ["New Sample", "testlink.htm", "", "", "Your Sample Tooltip", "middle", 0], 0)
A: To insert item in the specific position you should use thefollowing function:
function dm_ext_addItemPos (menuInd, submenuInd, iParams, Pos)
Q: In javascriptcoding I have id of the submenu. How can retrieve id of the parent menu item in the drop-down menus?
A: You can try to use the following function
function dm_ext_getSubmenuParams (menuInd, submenuInd)
Returns submenu parameters in the array:
[submenu_id, items_count, parent_item_id, submenu_level, is_horizontal]
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
Using this function you can retrieve the parent_item_id.
More info see:
http://deluxe-menu.com/functions-info.html