Recent Questions Floating Tree Menu
Q: One question. I'm working on my site and I'm wondering why the background images disappear for a while after hovering over them, then reappear after a while.
Can you tell me how to stop this from happening?
A: ow you have such parameter:
var itemBackColor=["#FFFFFF","#4792E6"];
The second color is the mouseover background color.
Q: I do have issues. There are not the problems when you are on the home page (you can click on one of the dropdown submenus and go there.
However, when you try to go to another page from there to another page on a nother drop down, nothing happens except javascript erros. The dropdowns physical work, in that they drop down, but the links don't go anywhere. Does that make sense.
A: See, the problem was in your dmWorkPath parameter
On all pages placed in the subfolder you should write it in thefollowing way:
<script type="text/javascript"> var dmWorkPath = "../ifnav.files/";</script>
Please, correct it.
You should also use additional parameters to make menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://www.infocusnet.org/design/";
These parameters allow to make images and links paths absolute.
For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://www.infocusnet.org/design/";
var menuItems = [
["text", "index.html", "icon1.gif", "icon2.gif"],
];
So, link path will be look so:
http://domain.com/pages/index.html
Images paths will be look so:
http://domain.com/images/icon1.gif
Please, use pathPrefix_link parameter.
Q: Is there any way to call a javascript function on mouseover from a menu item for a sub navigation bar?
A: You can use your own javascript functions in the menu items.
You should paste "javascript:some_function()" into item's link field, for example:
var menuItems = [
["text", "javascript:your_function(...)", ...]
];
var menuItems = [
["item text", "javascript:alert('Hello World')", , , , ,]
];
Unfortunately, you can't assign onmouseover/onClick event to each item. However, you can achieve this by using standard html objects within items, for example:
var menuitems = [
["item text
", "index.html"]
];
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;