Recent Questions Generate Dtree Menu Javascript
Q: I want to buy your product today, but have a few questions:
How do I change the font style for java menu templates to 9pt Verdana bold, but leave the sub-menus 9pt Verdana normal? I understand there’s a "fontStyle" variable, but is there an "itemfontStyle"? How do I make the left hand padding greater for the menu? I’m using the XP Style 1 and the far left top menu item is running up against my left hand border. I want to add about 10px of spacing to the left of the menu. How do I make the options in a menu have equal spacing? For instance, if there are 5 items in the menu, how can each have 100% / 5?
A: You can use Individual Item styles to set specific parameters for eachitem or submenu.
1.
var fontStyle=["normal 9pt Verdana","normal 9pt Verdana"]; //for subitems
//style for the top items
var itemStyles = [
["itemHeight=21px","itemBackColor=#F2F3F2,#1665CB","fontStyle='bold 9pt Verdana','bold 9pt Verdana'"],
];
2., 4. You should specify itemPadding parameter in "px". You shouldadd "px" in your style for subitems:
var menuStyles = [
["menuBackColor=#F2F3F2","menuBorderWidth=0","itemSpacing=1","itemPadding=4px","smOrientation=undefined"],
];
Notice also that you can set multiple value for itemPadding parameter,for example:
itemPadding=4px 10px 4px 10px
top right bottom left
4. You should set the exact width for the java menu templates:
var menuWidth="500px";
and set width for the top items using Individual styles:
["itemWidth=100px","itemHeight=21px","itemBackColor=#F2F3F2,#1665CB","fontStyle='bold 9pt Verdana','bold 9pt Verdana'"],
Unfortunately it is not possible to specify item's width in '%' inIndividual styles. The following width parameters won't work.
var menuWidth="100%";
["itemWidth=20%","itemHeight=21px","itemBackColor=#F2F3F2,#1665CB","fontStyle='bold 9pt Verdana','bold 9pt Verdana'"],
Q: Is it possible to make on top of the css tree menu 2 extra buttons:
* Expand all
* Collapse all
Which command do I use???
A: Tree Menu doesn't have such a feature now.
You can write your own function based on the following API functions:
function dtreet_ext_showItem (itemID, visibility)
function dtreet_ext_expandItem (itemID, expand)
Q: I have used Deluxe tuner menu on a web page and facing two small problems
a) The separator I have used do not show up. This is supposed to be a black horizontal line below every menu item. The image name is sep.jpg
b) The submenu appears on the right and I am unable to figure out a way to get the submenu to appear on the left. My navigation is placed on the right panel so if the sub menu appears on right of drop down menu bar, it practically goes off the page.
Can you please help with this and let me know why this is happening ?
A: 1) You should set separators between main items:
["Home","testlink.html", "data.files/bul.jpg", "data.files/bul.jpg", "", "", "", "", "", ],
["-"],
["About Us","", "data.files/bul.jpg", "data.files/bul.jpg", "", "", "", "", "", ],
And set:
var separatorVImage="data.files/sep.jpg";
var separatorVWidth="100%";
var separatorVHeight="1px";
var separatorPadding="0px";
2) You should set the following parameter:
var smViewType=2;
Q: I make an example of html menu, but when i use it with frameset then the menu not show completly.
Is this possible, perhaps by using a javascript call?
A: To initialize the cross frame menu you should call dm_initFrame() function
instead of standard dm_init() function within data.js file:
dm_initFrame(framesetID, mainFrameInd, subFrameInd, orientation);
framesetID - id attribute of the frameset;
mainFrameInd - index of the main frame (where the top-menu is placed), >=0;
subFrameInd - index of the subframe (where the submenus will be shown), >=0;
orientation - frame orientaion: 0 - top-to-bottom, 1 - left-to-right; 2 - bottom-to-top; 3 - right-to-left.
You will find additioanal info about cross frame menu here:
http://deluxe-menu.com/cross-frame-mode-sample.html