Recent Questions Javascript Treeview With Context Menu
Q: I am using XP style tree menu and would like to have top level menu item with no submenu items. However, the right double arrow icon still show up. Is there a way to hide it for the item without submenu items in css javascript tree menu?
See the attached document, I want to remove the double arrow icon at right for "Mission Statement", "History", "Direction" and "Contact Us".
Any help will be appreciated.
A: You can create Individual XP Style and use it for items with submenus:
var tXPExpandBtn=["left.files/blank-arrow.gif","left.files/blank-arrow.gif","left.files/blank-arrow.gif","left.files/blank-arrow.gif"];
var tXPStyles = [
["tXPExpandBtn=left.files/menu-arrow.gif,left.files/menu-arrow.gif,left.files/menu-arrow01.gif,left.files/menu-arrow01.gif"],
];
and assign this style for all top items with submenus:
["Home","", "", "", "", "", "", "0", "", "", ],
["+Company Profile","", "", "", "", "", "", "0", "0", "", ], //style 0
["|Item 25","", "", "", "", "", "", "1", "", "", ],
["|Item 26","", "", "", "", "", "", "1", "", "", ],
["+Projects","", "", "", "", "", "", "0", "0", "", ], //style 0
["|Item 27","", "", "", "", "", "", "1", "", "", ],
["|Item 28","", "", "", "", "", "", "1", "", "", ],
Q: Is it possible to have your menu mouseover call one of my functions?
I need to change some text on the screen based on which menu itemis highlighted.
A: Each menu items can include any html code.
So, you can include your own objects with onmouseover event, forexample:
var menuItems = [
["<div onmouseover='yourFunc()'>item text</div>"]
];
Where yourFunc() is Javascript function.
Q: I am interesting to use it for integration in some CMS I am currently using, as for instance : Xoops
1. Do you think that it is possible easily to integrate your menus with the xoops database content for the texts and links ?
2. Where links are they specified in the Deluxe Tuner interface
Thanks for your help
A: 1) JavaScript Tree Menu wasn't developed as Xoops extension,BUT you can use it as standard Javascript files.
To create and configure your menus use Deluxe Tuner application
(included into the trial package): http://deluxe-menu.com/deluxe-tuner-info.html
Please, try the trial version.
2) You can assign link for each item. You can do it in "ItemParameter" window "Link" field.
Q: I have function "confirmLogout()" that it returns true or false. If it is false, the function does not make nothing. If it's true, I need to direct for the page "goout.jsp". How to use this function in the mouseover drop menu?
function confirmLogout() {
if(confirm('It really desires to leave? ?')) {
return true;
} else {
return false;
}
}
A: Actually you can use your own Javascript code instead standard mouseover drop menu links. For example:
var menuItems = [
["text", "javascript:your_code_here"]
];
or
var menuitems = [
["<div onClick='your_code_here'>item text</div>", ""]
];