Recent Questions Unc Treeview Javascript
Q: I can't figure out how to get menu items to swap images to use like a traditional image rollover. In the Dhtml menu, I can change the style background without needing images, or I can use generic images as a background, but I have situations where I need to use unique images for each state of a button.
These unique image buttons contain text and graphics, and there are different images for different states: normal, mouse over, mouse down.
A: The menu has only two states normal and mouseover.
You should use Individual Item Styles.
Please, see the example of JavaScript Tree Menu here:
http://deluxe-menu.com/data-templates/vista-style-02-template-sample.html
You should use "itemBackImage" parameter.
var itemStyles = [
["itemWidth=92px","itemBorderWidth=0","fontStyle=normal 11px Tahoma","fontColor=#FFFFFF,#FFFFFF","itemBackImage=btn_greenblack.gif,btn_green.gif"],
];
Q: first - the deluxe menu is a nice tool, greatly.
but I have 2 little problems:
- I'll display the item direct side by side without distance, I can't found the parameter
- I wish the actual site (dhtml vertical menu item) in another colour
A: > - I'll display the item direct side by side without distance, i cant found the parameter
Check that you have correct
var menuWidth="";
parameter.
You can send us a copy of your html page (including .js files) ora direct link to your website, so we can check it.
> - I wish the actual site (menu item) in another colour
You can create Individual Item style and assign it for the top items,for example:
var itemStyles = [
["itemBackColor=#8080FF,#FFFF80","itemBorderWidth=1","itemBorderStyle=solid,solid", "itemBorderColor=#000080,#FF8000","showByClick=0"], //style0
];
var menuItems = [
["Item 1","", "", "", "", "", "0", "", "", "", "", ], //style0
["Item 2","", "", "", "", "", "0", "", "", "", "", ], //style0
["|Item 3","", "", "", "", "", "", "", "", "", "", ],
["|Item 4","", "", "", "", "", "", "", "", "", "", ],
["Item 5","", "", "", "", "", "0", "", "", "", "", ], //style0
["|Item 7","", "", "", "", "", "", "", "", "", "", ],
["|Item 8","", "", "", "", "", "", "", "", "", "", ],
["Item 6","", "", "", "", "", "0", "", "", "", "", ], //style0
];
Q: I have one more question before I purchase a license: is there a way to use images instead of text as the javascript menu object items?
A: Yes, you can create image-based menu.
If item text is empty, icon fields will be used as item images.
For example:
["", "index.html", "itemImageNormal.gif", "itemImageOver.gif", "Home Page"]
Q: I ordered & installed the dhtml collapsable menu.
I can't seem to get the floating function to work. Here's how I have the variables set in the data-tree.js file:
var tfloatable = 1;
var tfloatIterations = 10;
var tfloatableX = 0;
var tfloatableY = 1;
And here are the links to the .js files in my HTML doc <head>:
<!-- Javascript/DHTML Tree -->
<noscript><a href="http://deluxe-tree.com">JavaScript Tree Menu by Deluxe-Tree.com</a> </noscript>
<script type="text/javascript"> var tWorkPath="tree-menu/";</script>
<script type="text/javascript" src="tree-menu/dtree.js"></script>
<script type="text/javascript" src="tree-menu/dtree_add.js"></script>
<script type="text/javascript" src="tree-menu/dtree_ajax.js"></script>
<script type="text/javascript" src="tree-menu/dtree_dyn.js"></script>
<!-- Copyright (c) 2006, Javascript/DHTML Tree, deluxe-tree.com -->
Please let me know if there are any other settings that need to be changed. I'm hoping to go live with this site wed. so a quck reply is appreciated.
A: Notice, your dhtml collapsable menu won't float with relative position. You shouldset:
var tabsolute=1;