|
|
Do you have an example of creating menu javascripts using data stored in a database?
Return to Recent Questions
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.html
Return to Recent Questions
Related:
- Aug 28, 2006 - Top menu in a 6x4 cell layout (effectively a rectangle)
- Sep 29, 2006 - Is it possible to use an external file in the java drop down menu?
- Oct 27, 2006 - In IE 6.0 and Firefox 1.5.0.4, the submenus of my dhtml dropdown menu are not visible
- Nov 23, 2006 - It is possible to have context menu work with your tree menu dhtml?
- Nov 28, 2006 - Do I need any additional loaded software using the javascript select menu?
- Nov 30, 2006 - How to select the font and backcolors in java menubar using the hexidecimal number?
- Dec 06, 2006 - Is using search engine friendly code the same as using normal html menu bar for spiders?
- Dec 09, 2006 - Is there any way to change the font size of the secondary and tertiary links in menu.js?
- Dec 11, 2006 - How to add the new items to the dhtml vertical menu without using two data.js files?
- Dec 23, 2006 - How can I upgrade to Deluxe Menu v2.0? Now I'm using html menu codes v1.14.
- Dec 26, 2006 - I'm trying to have two separate mouseover menus on my web page.
|