Recent Questions
Q: I've encountered a problem when I was creating my collapsible menu javascript. I got an error message when I was creating my menu as follows:
----------------------------------
There is the error in the data file. The menu won't be loaded correctly.
Line: 361
Char: 3
Code: 0
Message:']' f=F6rv=E4ntas
----------------------------------
A: You have errors in your data file now. It is not correctly to writeitems in the following way:
["||10"","", "", "", "", "", "", "", "", "", ],
["||11"","", "", "", "", "", "", "", "", "", ],
You should write:
["||10","", "", "", "", "", "", "", "", "", ],
["||11","", "", "", "", "", "", "", "", "", ],Q: I got it working however I have an additional question.
How do I allocate the width of each "button" see sample how for instance the "FAQ" button is so narrow compared to others. I tried adding spaces with no result.
A: You can use Individual Item Styles to set exact width for the menuitems.
For example:
var itemStyles = [
["itemWidth=100px"], //style 0
];
var menuItems = [
["Home","testlink.html", "", "", "", "", "0", "", "", ], //style 0
["Product Info","", "", "", "", "", "0", "", "", ], //style 0
Q: Do you have a template example of creating menu javascripts using data stored in a database?
A: You may generate a menu from a database or XML using any server-side script, e.g., PHP, ASP, VB, etc.
However, these scripts don't work inside of Javascript .js files,
so, you should move parameters of a menu from a .js file into an html-page, e.g.:
<!-- Deluxe Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<!-- (c) 2006, http://deluxe-menu.com -->
<script type="text/javascript" language="JavaScript1.2">
// and describe parameters of a menu
var parameter1=value1;
var parameter2=value2;
etc.
var menuItems = [
// here you generate items using server-side scripts (php, asp, vb, etc.)
];
</script>
The example of the menu working with PHP/MYSQL you can find here:
http://deluxe-menu.com/rq-loading-bar-MySQL-support.htmlQ: I'm trying to disable a javascript mouse over menu item using the MS Office style 2 template and having no luck. Can you please provide me a sample of the MS Office style 2 template that will disable an item on the menu by graying it out?
A: To disable menu item you should set "_" target for it.
If you want that your disabled items have a grey color (in css-basedmenu) you should create additional style for it and assign this stylefor the disabled items:
["CSSText=toptext_dis,toptext_dis"],
.toptext_dis
{
font: normal 11px Tahoma, Arial;
color: #AAAAAA;
padding: 3px;
}
["|What's New","", "images/icon_office_note.gif", "images/icon_office_note2.gif", ,"_","1", , , ],
["||Popup Mode (Contextual Menus)","", "images/icon_office_mark.gif", "images/icon_office_mark.gif", ,"_","1", , , ],
You can find more info about menu items here:
http://deluxe-menu.com/menu-items-info.html