|
|
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:
- Oct 27, 2006 - In IE 6.0 and Firefox 1.5.0.4, the submenus of my dhtml dropdown menu are not visible
- 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 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.
- Feb 15, 2007 - When set up link in the dinamic menu by using Tuner app, it point to different dir
- Feb 25, 2007 - Could you please help me with creating of popup menu javascript?
- Feb 28, 2007 - I've started using your html menu example the CPU jumps to 100%
- March 16, 2007 - How multiple users could get varying transparent menus using file driven approach
- April 19, 2007 - I cannot find any examples of other sites that may be using your drop down menu.
|