Recent Questions Javascript Treeview Text
Q: Is it possible that a menuitem of the js dropdown menu stays highlighted after clicking and loading the new html site?
A: The menu has only two states normal and mouseover. We'll try to add the pressed state in the future.
You can 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 also set the correct
var pressedItem=1;
parameter on each html page.
Q: I have a paid version of the menu, and I was trying to add the functionality of dynamically adding net dhtml menu item
When I added the code I get the following JS error,
menu is undefined in dmenu_dyn.js (line 13)
dm_ext_addItemPos(1, 0, ["Netscape", "testlink.htm", "", 4 more...], -1)dmenu_dyn.js (line 13)
dm_ext_addItem(1, 0, ["Netscape", "testlink.htm", "", 4 more...])dmenu_dyn.js (line 13)
function dm_ext_hideAllSubmenus(mInd){_dmsm(mInd);};function dm_ext_changeItem(m...
I copied the example from your site, just to see if I can use it.
What am I doing wrong?
A: See, we have two menus on the sample's page
http://deluxe-menu.com/dynamic-functions-sample.html
That's why we write menuInd = 1
dm_ext_addItemPos(1, ...
dm_ext_addItemPos(1, 0, ["Netscape", "testlink.htm", "", 4 more...], -1)dmenu_dyn.js (line 13)
dm_ext_addItem(1, 0, ["Netscape", "testlink.htm", "", 4 more...])dmenu_dyn.js (line 13)
But if you have only one menu you should write menuInd = 0
dm_ext_addItemPos(0, ...
dm_ext_addItem(0, ...
Q: How can I make top items different colors in the dhtml pop up menu?
A: You should create 6 Individual Styles and assign them to you topitems.
var itemStyles = [
["itemBackColor=#0000ff,#0000ff","showByClick=0"], //style 0
["itemBackColor=#FF00FF,#FF00FF","showByClick=0"], //style 1
["itemBackColor=#00ffff,#00ffff","showByClick=0"], //style 2
["itemBackColor=#00ff00,#00ff00","showByClick=0"], //style 3
["itemBackColor=#FFFF00,#FFFF00","showByClick=0"], //style 4
["itemBackColor=#FF0000,#FF0000","showByClick=0"], //style 5
];
["Find out Who we are","http://www.yoursite.org/", "", "", "", "", "0", "0", "", "", "", ], //style 0
["Apply For Fellowship","http://www.yoursite.org/info.html", "", "", "", "_blank", "1", "", "", "", "", ], //style 1
["Fellows Corner","", "", "", "", "", "2", "", "", "", "", ], //style 2
["Enroll in a course","", "", "", "", "", "3", "", "", "", "", ], //style 3
["Engage in a discussion","", "", "", "", "", "4", "", "", "", "", ], //style 4
["Read The Bulletin","", "", "", "", "", "5", "", "", "", "", ], //style 5
Q: Would dhtml drop menu work to put the javascript command, OnClick=javascript:window.location.href=myvalue in the Link entry so that when a person clicks on the menu item, he navigates to the webpage specified in the OnClick?
A: > Would dhtml drop menu work to put the javascript command,
> OnClick=javascript:window.location.href=myvalue in the Link entry so
Actually you can use your own Javascript code instead standard links and html code inside item text. For example:
var tmenuItems = [
["text", "javascript:window.location.href=myvalue"]
];
or
var tmenuitems = [
["<div onClick='window.location.href=myvalue'>Table of Contents</div>", ""]
];
> Also, what features of IE 4 are not supported?
JavaScript Tree Menu support Internet Explorer 5+ only.
http://deluxe-menu.com/browsers-info.html