Recent Questions Javascript Tree Blog
Q: The AJAX sample for tree menu script on website does not have any styling applied at the moment.
I am assuming that it would support full styling with AJAX as well.
Is this correct?
A: You can use any style and templates for the AJAX sample.
Create a menu and set style you need using Individual Item Styles.
To enable AJAX Tree Menu use the following menu parameters:
var tajax=1;
Then set your menu in such way:
var tmenuItems = [
["Javascript/DHTML Tree: XP Style","", "", "", "", "XP Title Tip", "", "0", "", "data-samples/data-ajax5.js", ],
["+Samples Gallery","", "", "", "", "XP Title Tip", "", "0", "0", "", ],
["|Samples Block 1","", "", "", "", "", "", "", "", "data-samples/data-ajax.js", ],
["|Samples Block 2","", "", "", "", "", "", "", "", "data-samples/data-ajax.js", ],
["|Samples Block 3","", "", "", "", "", "", "", "", "data-samples/data-ajax.js", ],
];
Each .js file must contain menuItems variable for the submenu in the following format:
var tmenuItems = [
[text, link, icon1, icon2, icon2, tip, target, itemStyle, submenuStyle, jsFileName],
];
Where jsFileName - .js filename on the server that contains tmenuItems variable for the submenu.
For example:
var tmenuItems = [
["Home","testlink.htm", "", "", "", "Home Page Tip", "", "", "", "", ],
["Product Info","", "", "", "", "Product Info Tip", "", "", "", "data-samples/data-ajax2.js", ],
["Samples","", "", "", "", "Samples Tip", "", "", "", "data-samples/data-ajax4.js", ],
["Purchase","testlink.htm", "", "", "", "Purchase Tip", "", "", "", "", ],
["Support","", "", "", "", "Support Tip", "", "", "", "", ],
["|Write Us","mailto:[email protected]", "", "", "", "", "", "", "", "", ],
];
Q: I have an HTML application with 4 iframes. The main html file contains 3 iframes (top toolbar, left toolbar, and main area) and the menu. The main area iframe contains one additional iframe were the actual data is. When I interact with the data in this last iframe and try to dynamically change the menu in the .html file I get the error message: 'm' is null or not an object
The API call is:
dm_ext_addItem(0, 0, ["test1", "testlink.htm", "", "", "test1m", "_blank", "1"]);
I only have one menu.
I am using IE6
I included these files in both the hta file and the iframe source file.
<script type="text/javascript" src="./data.files/dmenu.js"></script>
<script type="text/javascript" src="./data.files/dmenu_dyn.js"></script>
<script type="text/javascript" src="./data.files/dmenu_key.js"></script>
A: JavaScript Tree Menu doesn't work with <IFrame> objects. It works with<frameset> objects only. All it can to do with <IFrame> is to loadpages into it.
You should use standard installation for the menu (cross-frame mode).
See more info here:
http://deluxe-menu.com/cross-frame-mode-sample.html
http://deluxe-menu.com/data-samples/cross-frame-horizontal-1-sample.htm
There is no need to call dmenu_...js files.
<script type="text/javascript" src="./data.files/dmenu.js"></script>
<script type="text/javascript" src="./data.files/dmenu_dyn.js"></script>
<script type="text/javascript" src="./data.files/dmenu_key.js"></script>
You should write:
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "./data.files/";</script>
<script type="text/javascript" src="./data.files/dmenu.js"></script>
<!-- (c) 2006, http://deluxe-menu.com -->
Q: I want that this tree expanded or collapsed (clicking on the image. e.g. like the right button) and go to the link when clicked on the item.
A: No problem.
You can assign a link to the item that has subitems.
When you'll click on item's button, it'll be expanded.
When you'll click on the item, item's link will be opened.
Q: The "drop down" menus go above the mouseover javascript menu, not below. I want them to go down. That's why it's a DROP DOWN menu and not a DROP UP menu.
And I tried the " var subMenuVAlign="bottom";" command as per your user database forum and it doesn't work.
So the problem is elsewhere....
BTW, I did not have this problem on the trial version, it appeared after I installed your js files in the scripts directory and the key in the data.js file
A: You should set the following parameter for mouseover javascript menu:
var subMenuVAlign="top";