Recent Questions Accessible Tree Menu
Q: Can you please write me, as I have the active menu button in the drop down menu software different color display?
A: The 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.
Q: I want to have one of the drop menus use a different image.
I am using thevista images and would like to have all of them but one use the same imageand the last one a different one. Can this be done?
If not I was able to adda second menu with the different image but for some reason the second menuwill not drop down. Can you help me with either of these?
A: You should create Individual Style for the last item and assign another image for it.
var itemStyles = [
["itemWidth=92px","itemHeight=21px","itemBackColor=transparent,transparent","fontStyle=normal 11pxTahoma","fontColor=#FFFFFF,#FFFFFF","itemBackImage=data-vista-01.files/btn_black.gif,data-vista-01.files/btn_black_blue.gif"],
["itemWidth=92px","itemHeight=21px","itemBackColor=transparent,transparent","itemBackImage=data-vista-2-03.files/btn_green.gif,data-vista-2-03.files/btn_green2.gif","fontStyle='normal11px Tahoma','normal 11px Tahoma'","fontColor=#FFFFFF,#FFFFFF"],];
var menuItems = [
["Home","testlink.html", "", "", "", "", "0", "0", "", "", "", ], //style 0
["Product Info","", "", "", "", "", "0", "", "", "", "", ], //style 0
...
["Purchase","http://deluxe-menu.com/order-purchase.html", "", "", "", "_blank", "0", "", "", "", "", ], //style 0
["Contact Us","testlink.htm", "", "", "", "", "1", "", "", "", "", ], //style 1];
Q: Will this menu rollout from within an iframe over a regular frame underneath it?
A: JavaScript Tree Menu doesn't work with <IFrame> objects. They work with
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!