Recent Questions Context Menu In Treeview Javascript
Q: Is there a way to center floatable menus horizontally on a page?
I used to use absolutePos=0, and all of my menus were centered ok, but when I tried floatable=1 I found that I had to change toabsolutePos=1 to get the menu to float, and this messed up my centering. Since I have multiple menus of different widths, I'd rather not have to hard-code the menu width, but please let me know if there's a better way.
A: Notice, when you use floatable menu you can't use relative menu position.
So, if you use
var absolutePos = 0;
and to center the menu you use <p> or <div> with the center alignment your menu won't float.
To center your floatable menu you should set absolute coordinates.
Q: How do I set just one sub menu link to open in a new window for the css dhtml menu
when the rest is set to _self ?
A: You can set item's target for each item individually:
["Home","testlink.htm", "default.files/icon1_s.gif", "default.files/icon1_so.gif",
"", "Home Page Tip", "_blank", "", "", "", ],Q: The menu is very large and I am concerned about load speed.
Does the ajax like technology just load the top tabs and then only the sub menus if they are clicked? I have clicked true and added 5 as there are 5 submenus but it does not seem to make any difference.
What can I do to speed up the javascript onclick menu?
A: Check that you've set the following parameter:
var dm_writeAll=0;Q: I would like to know how I indicate on a javascript menu, an item that was selected.
So in other words, if I have a horizontal navigation and I select the 3rd index along the menu
and select something from this, how can I make the 3rd index highlighted?
A: You can find more info here:
http://www.deluxe-menu.com/highlighted-items-sample.html
JavaScript Tree 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">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.