Recent Questions
Q: What I would like to achieve is a separator in the main menu list of a vertical menu.
I can get the separator to show in submenus but not the main menu.
A: You should write so:
var separatorImage="menu.files/sep_blue.gif";
var separatorWidth="90%";
var separatorHeight="3";
var separatorAlignment="center";
var separatorVImage="menu.files/sep_blue.gif";
var separatorVWidth="90%";
var separatorVHeight="3";
var separatorPadding="0px";
Q: I created a custom error page for a site, but the menu would not display.
I found that this was due to the erroneous "current directory" in the bad link test, for a non-existent directory.
which is: level2/level3/
I changed the script code from:
<script type="text/javascript"> var dmWorkPath = "DMworkfiles/";</script>
<script type="text/javascript" src="DMworkfiles/dmenu.js"></script>
to:
<script type="text/javascript"> var dmWorkPath = "DMworkfiles/";</script>
<script type="text/javascript" src="/DMworkfiles/dmenu.js"></script>
adding the "/" before "DMworkfiles/dmenu.js" source reference allowed the .js file to be found in the root directory and the menu would display.
The problem is that the little menu "expansion" arrow .gif cannot be found in the "current working directory" of level2/level3/. just little "blanks" show.
I tried changing:
var dmWorkPath = "DMworkfiles/";
to:
var dmWorkPath = "/DMworkfiles/";
but that did not enable the display of the arrows.
I also had to prefix all of the links in the menu with a "/" to indicate the root directory because of the "current directory" for the bad page.
I hope I have explained the problem sufficiently.
What am I doing wrong or missing here?
A: You can use additional parameters to make menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
These parameters allow to make images and links paths absolute.
For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
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
http://domain.com/images/icon2.gif
Please, try to use these parameters
Q: When I run the cursor over the menu, the menu images disappear for usually a split second, but sometimes for several seconds at a time. Is there a way to make the image static or keep it solid when the cursor runs over it?
A: You can have such effect when the page entirely was not loaded yet.
So, images were loaded only for the 1 state and for the other stat were not loaded yet.
If you don't want to have such effect you can use 1 state buttons.
Q: I am curious why there are no font settings for "Individual Styles" for"Submenu styles".
Basically I want to have a different font and color for my submenu items so they appear differently than the normal primary Items - but it seems there is only two options for fonts:
- The global font parameters affecting all fonts (primary and sub).
- And the Individial Styles for primary Item Styles.
Why no font paramenters for Submenu Items?
A: You can assign Item Style for the submenu item too.
See the example:
var itemStyles = [
["fontStyle=normal 13px Comic Sans MS"], //item style 0
];
var menuStyles = [
];
["Product Info","", "default.files/icon1.gif", "default.files/icon1o.gif", , , "0", , , ], //item style 0
["||How To Setup","testlink.html", "default.files/icon6.gif", "default.files/icon6o.gif", , , "0", , , ], //item style 0