Recent Questions Frameset Javascript Tree Menu Example
Q: How do I set the width of sub menu items to be the same width as the parent horizontal dhtml menu item? I can see how to set a px or % width, and when the at least one sub menu item exceeds the parent item the the entire menu stretches to that width (which is fine), but what about the instance where the sub menu items are not as wide as the parent item - in this case, the sub menu is not as wide as the parent item, which looks odd. Is there any way to force it to be (at least) the same width as the parent item?
I hope this is all clear to you, if not, please give me a shout for clarification.
A: You can set exact width for your top items using Individual Item Styles and set submenu width usingIndividual Submenu Style.
You should also set the following parameter:
var noWrap=0;
Q: I am interested in your Javascript/DHTML Tree Menu. For testing purposes, i downloaded the trial version of your software, but realized that the Textboxes an comboboxes, as shown in the samples on your website, are not included in the demo version. As i am interested in right this feature, could you please tell me where i can find more information about how creating such input boxes in the css expanding menu, and maybe also if there is a possibility to change the menu and write the changed one into a database?
A: You are able to paste any html code within items.
For example:
var tmenuItems = [
...
["||<nobr><FORM method=GET action='http://www.google.com/custom'><input name='as_q'
value='searchthe web' size=15 style='font-size:10'> <INPUT type=hidden name=cof
value='LW:144;L:http://domain.edu/images/sulogo.gif;LH:45;AH:center;GL:0;S:
http://domain.edu;AWFID:e01cb67b8afe383e;'></form></nobr>","",
"images/icons/search.gif", "", "", "", "", "2", "", "", "",],
Try that.
Q: We have two frames in a frameset, one for the menu and one for the content where the javascript menu frame expands normally without any problem. Our content frame's source is determined dynamically. The problem occurs when the content frame contains a page with another frameset in it. Unfortunately we can not avoid this for now. And when this happens our menu stops expanding.
A: Unfortunately it is really possible that you'll have problems in thatcase because the index of the content frame will be changed.
For example now you have:
<frameset id="frmSet">
<frame> //menu index=0
<frame> //content index=1
</frameset>
Your init function will be:
dm_initFrame("frmSet", 0, 1, 0);
But if you'll have frameset instead of content frame:
<frameset id="frmSet">
<frame> //menu index=0
<frameset>
<frame> // index=1
<frame> //content index=2
</frameset>
</frameset>
You should write your init function in the following way:
dm_initFrame("frmSet", 0, 2, 0);
You should change your javascript menu frame init function in that case.
Q: It is mostly working now except where I have two rows of nav tabs.. The top row opens new pages and the bottom row is just regular div tabs... works fine in IE and Firefox but not Chrome... any ideas?
A: Try to open links in the following way:
var bmenuItems = [
["Overview","link:Sun_Cabo_Services.asp", "", "", "", "", "0", "", "", ],
["-"],
["Villa Services","link:Cabo_Villa_Services.asp", "", "", "", "", "0", "", "", ],
["-"],
["Chef/Cook Services","link:Cabo_Chef_Services.asp", "", "", "", "", "0", "", "", ],
["-"],
["Spa Services","link:Cabo_Spa_Services.asp", "", "", "", "", "0", "", "", ],
];