Recent Questions Free Tree Menu Scripts
Q: I am conisdering purchasing your menu generator product, however I have a question that is very important to me.
How can I add a separator to the dhtml menu examples using the dynamic functions? It seems as though the only way to get a separator into the menu is by defining it before hand, but the website I'm building will require me to reload the menus dinamically, and I'm losing the ability to put separators on it.
If there's a workaround for it, or if there's a chance that you can give me a prototype function that exposes that functionality, that would be acceptable as well.
A: You should add items using the following function:
function dm_ext_addItem (menuInd, submenuInd, iParams)
or
function dm_ext_addItemPos (menuInd, submenuInd, iParams, Pos)
Find more info:
http://deluxe-menu.com/functions-info.html
Set the following parameter:
var dm_writeAll=1;
So, you should write:
dm_ext_addItem(0, 4, ["|-", "", "", "", "", "", "", ])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: Hello, I’ve set my menus up so that they are positioned on my page within a container div (not using the positioning built into the menu script).
I am also trying to use the autoscroll feature as some of the submenus are quite long. The autoscroll doesn’t seem to work with the css positioning though.
I also tried to size the submenus to force them small and thus to scroll with no luck.
The scrolling works fine when I pull the menus out of the container div and just place them in the flow of the page.
Am I doing something wrong or are these two features incompatible with each other.
A: Unfortunately, it is really so. Submenu scrolling doesn't work with css. We'll try to fix it in the future versions.
You can try to use multicolomn submenus.
http://deluxe-menu.com/multicolumn-menu-sample.html
Q: I have a Dynamic tree menu now.
Can I change the style of expandable javascript menu on the fly when I click the style menu items of the tree I made?
A: Theoretically you can do it.
Try to use
function dtreet_ext_userClick(itemID)
{
// Your Javascript code here
return true;
}
function and call
function dtreet_ext_changeItem (menuInd, itemID, itemParams)
function in it.
You should create Individual item style for this item and and assignthis style when you click on the item.