Recent Questions
Q: I was trying to figure something out myself but after a lot of hours I decided I will contact you.
I am working on a javascript collapsing menu and I am using the XP style one.
I don’t know why but the align of the text is not moving to the right side (because in Israel we write from right to left)
The sub-menu works great and all the text align to the right but from some reason the title is unmovable.
Please if you know any solution to that problem?
A: See how you can create your top javascript collapsing menu items:
- you can set the following parameter:
var tXPAlign="right"; //align of expand-buttons of submenus titles
- write your top items:
["+<div align=right> Deluxe Tree: XP Style</div>","", "", "", "", "XP Title Tip", "", "0", "", "", ],
Q: Can data be loaded dynamically?
For example, can your dhtml menu source code load the child of a node once the node is clicked on?
A: You can use AJAX like technology.
http://deluxe-menu.com/ajax-technology-menu-sample.html
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.html
Q: I was wondering how do I add more then five items on the top javascript toggle menu rather then using a sub menu.
A: Actually you can add as many top items as you want.
Use Deluxe Tuner to add more items or add them in your data filemanually, for example:
var menuItems = [
["Item 1","whatsnew.htm", "Buttons/whatsnewup.jpg", "Buttons/whatsnewover.jpg", "", "", "", "", "", "", "", ],
["Item 2","test.htm", "", "", "", "", "", "", "", "", "", ],
["Item 3","index.htm", "Buttons/homeup.jpg", "Buttons/homeover.jpg", "", "_parent", "", "", "", "", "", ],
["Item 4","about.htm", "Buttons/aboutup.jpg", "Buttons/aboutover.jpg", "", "_parent", "", "", "", "", "", ],
["Item 5","commserv.htm", "buttons/commservup.jpg", "buttons/commservover.jpg", "", "_parent", "", "", "", "", "", ],
["Item 6","conference.htm", "buttons/conferenceup.jpg", "buttons/conferenceover.jpg", "", "_parent", "", "", "", "", "", ],
["Item 7","lodges.htm", "buttons/districtsup.jpg", "", "", "_parent", "", "", "", "", "", ],
Q: I have set up a menu that uses one 'data.js' file.
However, on ONE page, the menu needs to have three additional items, with a different style.
Is there a way to add the three items with a different style via javascript on that one page?
I think I know how to handle the styles, but I'm unsure how to add the three new items without using two differerent 'data.js' files- which is how I have it set up for the time being. You may want to visit the site to see what I mean.
A: You can use dm_ext_addItem() function to add items.
Please, see how you should write this function:
function dm_ext_addItem (menuInd, submenuInd, iParams)
< SCRIPT src="Welcome to Catawba Animal Clinic, P_A_files/data.js" type=text/javascript> </SCRIPT>
<script type="text/javascript"> dm_ext_addItem(0, 0, ["Boarding Request Form","request.htm", , , , "_self", "0", "-1", , ]);</script>
<script type="text/javascript"> dm_ext_addItem(0, 0, ["Boarding Policies","", , , , , "0", , , ]);</script>
<script type="text/javascript"> dm_ext_addItem(0, 0, ["Express Checkout Info","", , , , , "0", , , ]);</script>
You should upload dmenu_dyn.js file on your server.
In your data.js file you should add need Individual Item Styles.