Recent Questions Menu Tree Menu Jquery
Q: I will build menu for several books’ Contents, each book is more than 100 lines and has links. I think if all the books’ contents in 1 *.JS file then it is TOO LOONG!!.
Can I break it down to 1 book for 1*.JS ? How?
A: You cannot divide your menuItems parameter.
You can only use one .js file for your menu parameters and the other.js file for your menuItems = [...];
But you can do it in two ways.
1) You can try to use several menus on the one page, for example:
param.js // file with menu parameters (all parameters before menuItems = [...];)
menu1.js // menuItems for "AC-DC", "ANLOG"
menu2.js // menuItems for "DIGITAL", "WinXP"
menu3.js // menuItems for "MS-Word", "MS-Excel"
In these menu files you should write
menuItems = [
...
];
dm_init();
Then you should install your menu in the following way
<script type="text/javascript" src="param.js"></script>
<table>
...
<script type="text/javascript" src="menu1.js"></script>
...
<script type="text/javascript" src="menu2.js"></script>
...
<script type="text/javascript" src="menu3.js"></script>
But it will be easier to use vertical menu in such case
var isHorizontal=0;
var smColumns=1;
2) You can also try to add some code, see the attached example.
In the first file (@MY books (Multiple Col.js) I write menuItems for the first item "AC-DC".
Notice that you should delete comma at the end of the last item
var menuItems = [
["AC-DC","", , , , , , , , ],
["|@Book1","testlink.htm", , , , , , , , ],
...
["|@Book3","", , , , , , , , ],
["||CH02","", , , , , , , , ],
["||CH01","", , , , , , , , ] // delete comma at the end of the last item
];
In the second file (@MY books (1.js) you should write
menuItems = menuItems.concat(
[
["ANLOG","", , , , , , , , ],
["|@Book1","", , , , , , , , ],
["|@Book2","", , , , , , , , ],
["|@Book3","", , , , , , , , ] // delete comma at the end of the last item
]
);
In the third file (@MY books (2.js) you should write
menuItems = menuItems.concat(
[
["DIGITAL","", , , , , , , , ],
["|Item 1332","", , , , , , , , ],
["WinXP","", , , , , , , , ],
["|Item 1333","", , , , , , , , ],
["MS-Word","", , , , , , , , ],
["|Item 1334","", , , , , , , , ],
["MS-Excel","", , , , , , , , ],
["|Item 1335","", , , , , , , , ] // delete comma at the end of the last item
]
);
dm_init();
Notice that you should write dm_init(); function in the last file.
In the .html file you should write
...
<tr>
<script type="text/javascript" src="@MY books (Multiple Col.js"></script>
<script type="text/javascript" src="@MY books (1.js"></script>
<script type="text/javascript" src="@MY books (2.js"></script>
</tr>
I hope you understand me.
Q: I have created a test page using deluxe menu and would like the menu to appear in the centre of a frame. I have tried usind <div> and <table> tags and while either gives correct results with Internet Explorer, neither gives correct results with Mozilla.
A: Try to set exact value for menuWidth, for example:
var menuWidth="130px";
Q: I am trying the menu and facing one problem…
The text is too large and doesn't wrap around.. instead it makes the dhtml menu layers wider.
My dhtml menu layers needs to be 175 px only.. if there are to many characters in the link, I like it to wrap around to the next line…
Any options?
A: You should set the following dhtml menu layers parameter:
var noWrap=0;
You can also use standard <br> tags inside item's text:
["All Card <br>Envelopes","", "", "", "", "", "", "", "", "", "", ],
Q: Is it possible via code customization to remove the border only for the top level of popup navigation
and subsequent menu levels with the border?
If yes, would you provide technical assistance with the required code change?
A: You can use Individual Item Style in that case.
You should create Individual Style, for example:
var itemStyles = [
["itemBorderStyle=none,none"], // style 0
];
And assign it for top items:
var menuItems = [
["Home","testlink.html", "", "", "", "", "0", "", "", "", "", ], // assign style 0
["Product Info","", "deluxe-menu.files/icon1.gif", "deluxe-menu.files/icon1o.gif", "", "", "0", "", "", "", "", ], // assign style 0
["|Features","testlink.html", "deluxe-menu.files/icon2.gif", "deluxe-menu.files/icon2o.gif", "", "", "", "", "", "", "", ],
["|Installation","", "deluxe-menu.files/icon2.gif", "deluxe-menu.files/icon2o.gif", "", "", "", "", "", "", "", ],
["|Supported Browsers","", "deluxe-menu.files/icon2.gif", "deluxe-menu.files/icon2o.gif", "", "", "", "", "", "", "", ],
["||Windows OS","", "deluxe-menu.files/icon3.gif", "deluxe-menu.files/icon3o.gif", "", "", "", "", "", "", "", ],
["||Internet Explorer","", "deluxe-menu.files/icon5.gif", "deluxe-menu.files/icon5o.gif", "", "", "", "", "", "", "", ],
["||Firefox","", "deluxe-menu.files/icon5.gif", "deluxe-menu.files/icon5o.gif", "", "", "", "", "", "", "", ],
["Samples","", "deluxe-menu.files/icon1.gif", "deluxe-menu.files/icon1o.gif", "", "", "0", "", "", "", "", ], // assign style 0
["|Sample 1","testlink.html", "deluxe-menu.files/icon6.gif", "deluxe-menu.files/icon6o.gif", "", "", "", "", "", "", "", ],
["|Sample 2 is Disabled","testlink.html", "deluxe-menu.files/icon6.gif", "deluxe-menu.files/icon6o.gif", "", "_", "", "", "", "", "", ],
["Purchase","http://deluxe-menu.com/order-purchase.html", "deluxe-menu.files/icon1.gif", "deluxe-menu.files/icon1o.gif", "", "_blank", "0", "", "", "", "", ], // assign style 0
["Contact Us","testlink.htm", "deluxe-menu.files/icon1.gif", "deluxe-menu.files/icon1o.gif", "", "", "0", "", "", "", "", ], // assign style 0
];
More info you'll find here:
http://deluxe-menu.com/individual-item-styles-info.html