Recent Questions Free Javascript Folding Tree Menu
Q: I need to know how to have the background in the main items of the dynamic menu transparent, and then the sub-menus a different translucent color.
A: To set transparent background for the menu you should set:
var menuBackColor="transparent";
var itemBackColor=["transparent","transparent"];
and use Individual Item Styles for your submenus:
var itemStyles = [
["itemBackColor=#8EE8E1,#26BBB0"], //style0
["itemBackColor=#F4B7FB,#E65AF5"], //style1
];
var menuItems = [
["Home","testlink.html", "", "", "", "", "", "", "", ],
["Product Info","", "default.files/icon1.gif", "default.files/icon1o.gif", "", "", "", "", "", ],
["|Features","testlink.html", "default.files/icon2.gif", "default.files/icon2o.gif", "", "", "0", "", "", ], //style0
["|Installation","", "default.files/icon2.gif", "default.files/icon2o.gif", "", "", "1", "", "", ], //style1
["||Description of Files","testlink.html", "default.files/icon6.gif", "default.files/icon6o.gif", "", "", "", "", "", ],
["||How To Setup","testlink.html", "default.files/icon6.gif", "default.files/icon6o.gif", "", "", "", "", "", ],
["|Parameters Info","testlink.html", "default.files/icon2.gif", "default.files/icon2o.gif", "", "", "0", "", "", ], //style0
["|Dynamic Functions","testlink.html", "default.files/icon2.gif", "default.files/icon2o.gif", "", "", "1", "", "", ], //style0
["|Supported Browsers","", "default.files/icon2.gif", "default.files/icon2o.gif", "", "", "0", "", "", ], //style0
["||Windows OS","", "default.files/icon3.gif", "default.files/icon3o.gif", "", "", "", "", "", ],
["||Internet Explorer","", "default.files/icon5.gif", "default.files/icon5o.gif", "", "", "", "", "", ],
["||Firefox","", "default.files/icon5.gif", "default.files/icon5o.gif", "", "", "", "", "", ],
["||Mozilla","", "default.files/icon5.gif", "default.files/icon5o.gif", "", "", "", "", "", ],
["||Netscape","", "default.files/icon5.gif", "default.files/icon5o.gif", "", "", "", "", "", ],
["||Opera","", "default.files/icon5.gif", "default.files/icon5o.gif", "", "", "", "", "", ],
["||MAC OS","", "default.files/icon3.gif", "default.files/icon3o.gif", "", "", "", "", "", ],
["||Firefox","", "default.files/icon5.gif", "default.files/icon5o.gif", "", "", "", "", "", ],
Q: I'm wondering if you can use the Link Item of the JavaScript Tree Menu to have ASP code, similar to yoru FAQ below, only replacing the Javascript with ASP?
Q: I want to use Javascript instead of usual links for menu items. How can I do that? A: To do that you should add a function word "javascript" in the URL field of an item, e.g.:
var menuItems = [
[text, "javascript:alert('Hello, world!')", icon1, icon2],
];
A: Thanks for your interest in our products.
You can use any server-side script, e.g., PHP, ASP, VB, etc.
You can find the example with PHP here:
http://deluxe-menu.com/generate-menu-from-database-xml-php-asp-vb-support.html
http://deluxe-menu.com/rq-loading-bar-MySQL-support.html
Q: I am trialing your tab menus at the moment and plan to use them on my website. I think they are excellent. I have been trying to work something out and hope you can help me. I have a nice menu set up, and want to change web pages when one of the tabs is clicked. How can the new page have the same java jump menu, but with a different tab activated? I can only seem to get this to work with a menu on a page that goes nowhere. I would have to pass a new value to bselectedItem but I don't know how.
A: Deluxe Tabs doesn't support API functions which can return theselected tab.
You can set "bselectedItem" and " var bselectedSmItem" parametersbased on your link before you call your data file.
For example, move " var bselectedItem" and " var bselectedSmItem" parametersfrom your data file to your code.
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem=<?php echo $seltabs; ?>;
var bselectedSmItem=<?php echo $selsmtabs; ?>;
</script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD>
You should define seltabs and selsmtabs using server side script.
You can also set it on every page before you call data.js file, forexample:
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem=4;
var bselectedSmItem=3;
</script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD>
Try that.
Q: > You should call the following function:
> dtreet_ext_getItemIDByIndex (0, 12)
> where 12 - is index of the item.
How would I know that 12 is the index of the item? How is itemInd different from its itemID? I assume the menuInd is always 0 for the first menu (or only in my case) menu on a page?
A: Yes, menuInd is the number of the menu on your page (in your casemenuInd=0).
itemInd is the number of the item in your menuItems, for example:
var tmenuItems =
[
["Home", "http://deluxe-tree.com", "icon1_t.gif", "icon1_to.gif","", "Home Page Tip","_blank"],//itemInd=0
["<img src='data_files/images/sep.gif' width=113 height=1>"],//itemInd=1
["+What's New<br><span id='letter'>This is pretty cool. I need to buy this deluxe menu</span>", "", "icon2_t.gif", "icon2_to.gif", "", "Product Info Tip"],//itemInd=2
["|What's New", "testlink.htm", ""], //itemInd=3
["|Features", "testlink.htm", ""], //itemInd=4
["|Installation", "testlink.htm", ""], //itemInd=5
["|Functions", "testlink.htm", ""], //itemInd=6
["|Supported Browsers", "testlink.htm", ""], //itemInd=7
["Samples", "", "icon3_t.gif", "icon3_to.gif", "", "Samples Tip"], //itemInd=8
["|Sample 1", "testlink.htm", ""], //itemInd=9
["|Sample 2", "testlink.htm", ""], //itemInd=10
["|Sample 3", "", ""], //itemInd=11
["||New Sample 1", "testlink.htm", ""],//itemInd=12
["||New Sample 2", "testlink.htm", ""],//itemInd=13