Recent Questions Tree Menu Script
Q: We have a question and a problem.
This is a link to our website with your menue:
http://domain.bon.at/philosophie.html
Down the navigation point "FAQґs" is a submenue like darm, diverses, einlagen etc....)
If you click on a link in this submenue a new window open _BLANK!
Is it possible to open the new site in a popup in dhtml drop down menu, like 800 x 600 or something?
A: You should paste the following code inside 'Link' field of menuItems (you can do it inDeluxe Tuner):
javascript:window.open('http://www.google.com','_blank','height=600,width=800, status=yes,toolbar=no,menubar=no,location=no');Q: I have a JavaScript Tree Menu Multiple Website License and have been using it in several projects where it is running without problems. But now in my new project the sub menu won't drop down in the content frame, but will appear in the same frame as the main menu. What's wrong?
A: It seems that you open the submenu in the wrong frame.
Set ID for the first frameset:
<FRAMESET id=frmSet rows=220,*>
<FRAME id=frame1 src="JavaScript Tree Menu Samples_files/cross-frame-horizontal-1.htm"> //menu frame
<FRAME id=frame2 name=frame2 src="JavaScript Tree Menu Samples_files/testlink.htm"> //content frame
</FRAMESET>
Then you should open your data file in any text editor and change
dm_init(); to dm_initFrame("frmSet", 0, 1, 0);
For more info see:
http://deluxe-menu.com/cross-frame-mode-sample.html
Q: When I select something from one of the mouseover menus it takes me to a link on a website,
is it possible to run a javascript instead?
A: Actually you can use your own Javascript code instead standard links and html code inside item text.
For example:
var bmenuItems = [
["text", "javascript:your_code_here"]
];
or
var bmenuitems = [
["<div onClick='urlSubstitution(\'transco/sheet.asp?stype=1\')'>Table of Contents</div>", ""]
];
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;