Recent Questions
Q: How I can write the changed dhtml pull down menu into a database?
A: Unfortunately, we don't have such example.
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 Tree -->
<noscript><a href="http://deluxe-tree.com">Javascript Tree Menu by Deluxe-Tree.com</a></noscript>
<script type="text/javascript" src="menudir/dtree.js"></script>
<!-- (c) 2006, http://deluxe-tree.com -->
<script type="text/javascript" language="JavaScript1.2">
// and describe parameters of a menu
var parameter1=value1;
var parameter2=value2;
etc.
var tmenuItems = [
// 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
This example is not for Deluxe Tree menu, but you can create your menu in the same way.
Q: As I have stated before, your Deluxe-Menu is very very good.
But there is allways room for improvement.
Is there any chance to see support for the following in Deluxe-Menu:
When I move the mousepointer above a menuitem and right-click I would like to see in the javascript contextual menu (the context menu provided by the browser):
Open Link in new window
Open Link in new tab
If the above is not possible or not something you want to enable.... then, there should be possible to make a workaround to make this work:
I see there is support for custom javascript contextual menus.....
.... is there any possibility to make a custom context menu that show above a menuitem and that show when right clicking on the menuitem.
Should hopefully be possible to create in such way that I create one context menu in javascript (the deluxe menu way... ) , but when clicking on "Open link in new window" from that custom menu, then the JS code should call a javascript function of mine (or yours), with a parameter related to the menuitem that was right-clicked...
And this javascript function should be able to resolve the actual URL (based on the input parameter rel. to the menuitem) and then open a new window using window.open()
If not possible to implement using the native browser context menu, then I belive it should be possible to do it using my workaround how to.....
Just a thought....
Any suggestions on how I can make the workaround work, or if maybe you could support the workaround in some way in future releases of Deluxe-Menu?
A: Yes, there is a workaround.
You can write your items in the following way:
["|<a href='http://www.domain.com' class="link">test test test</a>",""],
You should assign style for this link.
A.link {
...
}
A.link:hover {
...
}
Q: I have generated my navigation menu bar and want to incorporate it into my current website.
How do I resize and position the navigational menu inside a table?
A: 1) Resize:
You could specify exact width for menu using that parameter:
var menuWidth="400px";
You can also set exact width for each top item using Individual Item Styles:
var itemStyles = [ ["itemWidth=120px"],];
var menuItems = [ ["Item 1","", "", "", "", "", "0", "", "", ],
["Item 2","", "", "", "", "", "0", "", "", ],
["Item 3","", "", "", "", "", "0", "", "", ],
["Item 4","", "", "", "", "", "0", "", "", ],
["Item 5","", "", "", "", "", "0", "", "", ],
];
2) Position the navigational menu inside a table:
You can paste the menu inside the <div> or <table> tag, for example:
<DIV align=center>
<SCRIPT src="data/data.js" type=text/javascript>
</SCRIPT>
</DIV>
<table width=800>
<tr>
<td align=center width=600><script type="text/javascript" src="data/data.js"></script></td>
</tr>
</table>
Q: I have included your menu in my latest site.
My problem is that the menu javascripts, as opposed to being in a fixed position as stated in the .js file floats up and down with the page... How do I fix this..
A: You should set the following parameter to disable the floating feature:
var floatable=0;