Recent Questions Javascript Tree Layout Svg
Q: When I check my website for accessibility it shows NoAlt on the dhtml drop down menu!.
Where do I add an alt tag in the data file?
A: You should use the fifth parameter in menuItems
[text, link, iconNormal, iconOver, tip, target, itemStyleInd, submenuStyleInd, jsFilename],
For example:
["Home","index.htm", "", "", "Home", "", "", "", "", ],
["|Dr. Copeland's Bio","bio.htm", "", "", "Dr. Copeland's Bio", "", "", "", "", ],
["|Destiny History","history.htm", "", "", "Destiny History", "", "", "", "", ],
["|Contact Destiny","contact.htm", "", "", "Contact Destiny", "", "", "", "", ],
["|Dr. Copeland's Itinerary","itinerary.htm", "", "", "Dr. Copeland's Itinerary", "", "", "", "", ],
Q: I would like to create my own jpeg images and use them as the mouseover-items in the top level drop down menus. I am not talking about the backround. I mean the actual upfront button.
I seem to be locked into the size which is the default and would like to change it to width = 180px and height = 45px for each item in the menu.
Is there any way to do that?
A: You should create Individual Style and assign it for all top items.
var itemStyles = [
["itemWidth=180px"],
];
var menuItems = [
["Home","testlink.html", "", "", "", "", "0", "", "", ],
["Product Info","", "deluxe-menu.files/icon1.gif", "deluxe-menu.files/icon1o.gif", "", "", "0", "", "", ],
Q: I want to be able to pull information into dynamic drop down menu from the mysql 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.:
<!-- JavaScript Tree 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) 2008, 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.html
Q: It's simply not saving the state. Clicking the items on the menu is inconsistent. Sometimes it saves sometimes not.
It seems to be a lot worse in this area.
A: See, Tree Menu saves it's state using cookies.
But it can't re-save the same cookie file from different folders.
For example, if the tree from "website/page.html" saves it's state,the menu from "website/content2/page.html" can't read this state andit creates it's own state. The problem is that it's a standardfeature of browsers and Javascript can't control that.