Recent Questions Tree Menu With Sort
Q: Hi I have a menu item which has a word wrap on it. The word wrap it auto so instead of saying the following
Sickline Call
123456789
It says
Sickline Call 123
456789
I need to put either spaces in the title to level it out or a carage return
A: You can use any <html> code within menuItems, for example:
var menuItems = [
["Home","testlink.html", "", "", "", "", "", "", "", ],
["Sickline Call<br>123456789","", "default.files/icon1.gif", "default.files/icon1o.gif", "", "", "", "", "", ],
Q: If you click a list drop menu link in the tree that opens a new page, for example, Solutions:By Type:Psuedo Wire , the link, Psuedo Wire, remains highlighted.
If you click a line that targets _self, for example, Solutions: By Type: T1 Extender, the link does not remain highlighted. My web app will need highlighting and all links will target _self. I have to solve this problem soon or else look elsewhere.
A: It is normal behaviour, your list drop menu can save its state within one page only.
You can try to use frames, and open pages in the content frame. Also you can use aserver-side script (php, asp, vb, etc.) to generate html pages fromtemplates on your server (we use this method on our website
http://deluxe-tree.com).
You should set a pressed item using Javascript API:
function apyt_ext_setPressedItem(menuInd, itemID)
<script type="text/javascript"><br>
var i = 4 //index of the selected item
onload=setPressed;
function setPressed()
{
dtreet_ext_setPressedItem(0,dtreet_ext_getItemIDByIndex(0, i));
}
</script>
To expand specific items you should use the following function: dtreet_ext_expandItem (dtreet_ext_getItemIDByIndex (0, 11), 1);
Q: I am using JavaScript Tree Menu and I had a question.
When you roll your mouse over the menu items, the background color of that menu item changes (it becomes darker). Is there a way to establish a setting such that when a Menu Item is CLICKED, the color of that Menu Item STAYS darker. This will help the user know which category of the website they are currently visiting.
Please let me know. Thanks!
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.
Q: Is there a way to specify certian font styles escpecailly a hanging indent on the text of the navigation menubar?
A: You should use Individual styles, for example:
var itemStyles = [
["fontStyle=bold 12px Arial,Helvetica", "fontDecoration=none,underline"], // style 0
["fontStyle=normal 12px Arial,Helvetica", "fontDecoration=underline,underline"], // style 1
["fontStyle=normal 14px Arial,Helvetica", "fontDecoration=none,none"], // style 2
];
And assign styles to your items:
var menuItems = [
["1 Item","index.php","","","","_self","0",,,],
["2 Item","","","","","_self","1",,,],
["|Submenu Item","","","","","_self","2",,,],
...