Recent Questions Extjs Iframe Tree Menus
Q: Is it possible to have menu items act like regular hyperlinks?
For instance in Firefox I like to "middle click" hyperlinks to open them in a new tab, or in IE right click and open in new window.
However with Deluxe-Menu this does not seem to work.
A: If you want to open your links in the new window you should set the item target parameter to "_blank", for example:
var menuItems = [
["Home","testlink.html", , , , "_blank", , , , ],
...
You can include also any html code in the Item Text.
For example:
["<a href='http://deluxe-menu.com/'>Home</a>","", , , , , , , , ],
Q: I have small problems with your javascript menu system.
#1. I am creating a multi-level menu, am I limited to a gird format or can every item have a variable column width?
#2. With submenus, I want to have the submenu be the same width as the parent cell, is there a simple command for this, or do I have to guess the column widths until it fits correctly?
#3. In those same submenus, I have items that are longer than the parent, is there a word wrap or a way to define a break, rather than having the scroll feature?
A: 1) You should use Individual Item Styles.
For example:
var itemStyles = [
["itemWidth=120","itemBorderWidth=1","itemBorderStyle=solid,solid","itemBackColor=#ACF88B,#ACF88B","itemBorderColor=#329309,#329309"], //style0
["itemWidth=100","itemBorderWidth=1","itemBorderStyle=solid,solid","itemBackColor=#FFFFFF,#FFFFFF","itemBorderColor=#1B92E9,#1B92E9"], //style1
["itemWidth=130","itemBorderWidth=1","itemBorderStyle=solid,solid","itemBackColor=#FF9684,#FF9684","itemBorderColor=#EC7575,#EC7575"], //style2
["itemWidth=150","itemBorderWidth=1","itemBorderStyle=solid,solid","itemBackColor=#84F9FF,#84F9FF","itemBorderColor=#00B8C1,#00B8C1"], //style3
];
var menuStyles = [
["smColumns=2"], //style0
];
["Home","testlink.htm"],
["Samples","testlink.htm"],
["|Group 1","", , , , , "0", , , ],
["|Group 2","", , , , , "1", , , ],
["|Group 3","", , , , , "2", , , ],
...
[" More Samples","testlink.htm"],
["|Group 1","", , , , , "3", "0", , ],
["|Group 2","", , , , , "1", , , ],
Where "0", "1", "2", "3" - style number in itemStyles.
2) You can also use Individual Item Styles.
var itemStyles = [
["itemWidth=120px"],
];
var menuStyles = [
["smWidth=120px"],
];
["Product Info","", "default.files/icon1.gif", "default.files/icon1o.gif", , , "0", , , ], // itemStyles
["|Features","testlink.html", "default.files/icon2.gif", "default.files/icon2o.gif", , , , "0", , ],
["|Installation","", "default.files/icon2.gif", "default.files/icon2o.gif", , , , , , ], // menuStyles
3) Try to set this parameter:
var noWrap=0;
Q: We'd tried the useIFrame = 1 as well and the issue is fixed but the IE6 shows a "non secure objects over a secure connection" message, it worries me because on one side the problem is solved but on the other hand it generates confusion.
As an alternative we're planning to use the Deluxe navigation tree in order to avoid these overlapping problems, but it doesn't show up in IE7 over W2K3 R2!!
We requiere your support to use either the Javascript/DHTML Tree or the JavaScript Tree Menu,
I'll look forward your kind answer.
A: Deluxe navigation tree works fine in IE7.
Try to set width and height parameters:
var tmenuWidth="230px";
var tmenuHeight="auto";
Q: Is there any way I can do the opposite and make the space my separators take up only a few pixels high? At present I can only make them the same height as the other buttons even though the separator image is only 2 pixels high.
A: You should set a separator in the menuItems, for example:
var menuItems = [
["Home","index.cfm", , , , , , , , ],
["-"],
["About Us","about.cfm", , , , , , , , ],
];
Please, see the following parameters:
//--- Separators
var separatorImage=""; //for subitems
var separatorWidth="100%";
var separatorHeight="3px";
var separatorAlignment="right";
var separatorVImage="images/public/separator.gif"; //for the top items
var separatorVWidth="100%";
var separatorVHeight="2px";
var separatorPadding="";