Recent Questions Explorer Tree Structured Selection Javascript
Q: Hello. I have noticed that when you expand a menu and then click to another page, the menu is collapsed on the next page. I read about "state saving" and tried the parameter which did not work. Is there a way to accomplish this?
A: You can see the example for state saving here:
http://dhtml-menu.com/tree-examples/tree-menuxp-save-state.html
This menu saves its state.
To enable this mode you should include dtree_ss.js file intoyour html page and set the following parameter:
var tsaveState = 1;
See, if you open pages (with menus) from different folder itmeans that you open different menus. So, when you change a state, forexample, of the first menu within "content/" folder and then openanother page with the menu within "content/subfolder/", browsers looks for anothercookie file and can't find it and the second menu stays in a defaultstate. Is it clear?
Q: IHow can i make that the background-color will be standing behind the click in this part of dhtml menu slide?
A: JavaScript Tree Menu has only two states normal and mouseover, but
you can highlight menu items by default in two ways:
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">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.
You can find more info here:
http://www.deluxe-menu.com/highlighted-items-sample.htmlQ: I am evaluating various menu systems and need to know if your supports key navigation, like alt-F to select a menu?
A: JavaScript Tree Menu has keystrokes support.
Use the following parameter to enable keystrokes support:
var keystrokes = 1;
0 - disabled (default), 1 - enabled.
Ctrl+F2 - enter the menu/switch to next menu on the page.
Arrow keys - navigate.
Enter - enter the menu.
Esc - exit the menu.
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.
Please, try the trial version, http://deluxe-menu.com
Q: How can I add a submenu to the parent javascript menu horizontal?
A: You should add '|' symbols before item's text.
["Samples","", "", "", "", "", "", "", "", "", "", ],
["|Sample 1","testlink.htm", "", "", "", "", "", "", "", "", "", ],
["|Sample 2","testlink.htm", "", "", "", "", "", "", "", "", "", ],
["||Sample 2","testlink.htm", "", "", "", "", "", "", "", "", "", ],
Actually you can create your menu easily in Deluxe Tuner GUI tool.