Recent Questions Tree Menu Javascript Rapidshare
Q: Is there any way to change the font size of the secondary and tertiary links but yet have a different font size for the primary links?
A: You can use different font style for each link on each level.
You should use Individual Item Styles.
Please, use Dhtml Tuner application to create individual styles.
For example:
// --- DHTML Tuner style names ---
var tstylesNames=["Individual Style 1","Individual Style 2","Individual Style 3","Individual Style 4","New Individual Style",];
var tXPStylesNames=["Individual Style 1",];
var tstyles = [
["tfontStyle=bold 8pt Tahoma","titemBackColor=#265BCC,#265BCC","tfontColor=#FFFFFF,#428EFF","tfontDecoration=none,none"],
//style 0 ["tfontStyle=bold 8pt Tahoma","titemBackColor=#265BCC,#265BCC","tfontColor=#215DC6,#428EFF","tfontDecoration=none,none"],
//style 1 ["tfontDecoration=none,none"],
//style 2
["tfontStyle=normal 8pt Tahoma","tfontColor=#013D6D,#5555FF"],
//style 3
["tfontStyle=bold 11px Bookman Old Style","tfontColor=#000000,#000000","tfontDecoration=none,underline"],
//style 4
];
var tmenuItems = [
["+DHTML Menus","", "images/xpicon1.gif", , , "DHTML Menus", , "0", , , , ],
//style 0
["|DHTML Menu","http://dhtml-menu.com", "images/icon1.gif", "images/icon1o.gif", "images/icon1o.gif", "Information", "_self", , , , , ],
["|+DHTML Tree Menu","", "images/icon1.gif", "images/icon1o.gif", "images/icon1o.gif", "Support", "_self", "2", , , , ],
//style 2
["||2 styles: standard & XP","", , , , , , "3", , , , ],
//style 3
["|||Item 23","", , , , , , "4", , , , ],
//style 4
["|||Item 24","", , , , , , , , , , ],
["||Individual Item & Submenu Styles","", , , , , , "3", , , , ],
//style 3
["||Floatable & Movable Menu","", , , , , , "3", , , , ],
//style 3
....
Q: Can I use my own images as the tabs in a div tab menu?
A: The Drop down menu items have the following structure:
var menuItems = [
[text, link, iconNormal, iconOver, tip, target, itemStyleInd, submenuStyleInd, jsFilename],
[text, link, iconNormal, iconOver, tip, target, itemStyleInd, submenuStyleInd, jsFilename],
...
];
Where iconNormal, iconOver - Icons of an item: icon in normal state, icon in mouseover state.
So you can set your menu items in a such way:
var menuItems = [
["","testlink.htm", "icon1.gif", "icon1o.gif"],
["","", "icon2.gif", "icon2o.gif"],
["|","testlink.htm", "icon3.gif", "icon3o.gif"],
["|","testlink.htm", "icon4.gif", "icon4o.gif"],
["|","testlink.htm", "icon5.gif", "icon5o.gif"],
["","testlink.htm", "icon1.gif", "icon1o.gif"],
];
Q: Your service is excellent and I am making progress learning the program. I was able to resolve the transparency issue thanks to your help but, but now I have another one that is stumping me.
I can get the menu to show up in my html document and it works as I hoped it would. However, no matter where I put the line of code in my html file, the down menu in dhtml always shows up at the very top of the page. The instructions indicate the following:
Copy the following code into clipboard and paste it into the place you want to have the down menu in dhtml:
<script type="text/javascript" src="newmenu2.js"></script>
For example, into a table cell:
<table>
<td><script type="text/javascript" src="newmenu2.js"></script></td>
</table>
No matter where I put the code:
<script type="text/javascript" src="newmenu2.js"></script>, the menu shows up at the top of the page.
What am I missing?
A: Check that you're using relative position for the down menu in dhtml:
var absolutePos=0;
var posX="0px";
var posY="0px";
Q: I cannot see my menu in IE7. Please, help!
A: Try to set exact value for the menu width
var menuWidth="700px";
Try that.