Recent Questions Back Button Collapses Css Tree ViewQ: A question: How do I make it show all the drop down dhtml menu items rather than having them pop up?
- Item 1
- sub item 1
- sub item 2
- sub item 3
var texpanded = 1;
Q: Is it possible, for instance, to call dm_init multiple times in the list menu java? If so, do you have an example?
A: Yes, you can call dm_init(); function multiple times (for example youcan call several data files, or move menuItems array and dm_init();function into your page directly) to have multiple menus on your page.
Q: Your service is excellent and I am making progress learning the program. I was able to resolve the transparency issue thanks to your help but, but now I have another one that is stumping me.
I can get the menu to show up in my html document and it works as I hoped it would. However, no matter where I put the line of code in my html file, the down menu in dhtml always shows up at the very top of the page. The instructions indicate the following:
Copy the following code into clipboard and paste it into the place you want to have the down menu in dhtml:
For example, into a table cell:
No matter where I put the code:
What am I missing?
A: Check that you're using relative position for the down menu in dhtml:
Q: I just noticed as well that I cannot change the spacing of the buttons.
Right now the buttons are tight together, how do I create a gap between each dhtmlmenu button?
A: You can paste the separator.
Please, see the following parameters:
//------- Separators -------
var separatorWidth = "10";
var separatorHeight = "20";
var separatorAlignment = "center";
var separatorImage = "C";
var separatorVWidth = "150";
var separatorVHeight = "10%";
var separatorVImage = "image.jpg";
You can create separators using menuItems, for example:
var menuItems = [
["-"], // this item is separator
You can also use this parameter:
var itemPadding = "4px";
You can also set multiple values, for example:
"2px 15px 5px 5px";
(top, right, bottom, left)