|
|
May I can use PHP code in menu items of my dhtml website navigation menu?
Return to Recent Questions
Q:
May I can use PHP code in menu items of my dhtml website navigation menu?
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 - Horizontal at level 1, Horizontal at level 2, then vertical?
- Sep 26, 2006 - Is there a way to change the height of the main buttons in my simple dhtml menu.
- Sep 29, 2006 - I tried to use javascript function with the "Title item" of my javascript tree view.
- Oct 27, 2006 - In IE 6.0 and Firefox 1.5.0.4, the submenus of my dhtml dropdown menu are not visible
- Oct 28, 2006 - Subitems of the mouseover menu don't close when the mouse goes away...
- Oct 30, 2006 - I don't see on my website dhtml mouseover menu that I saw on my local machine.
- Nov 05, 2006 - The font color doesn't change when I roll over the dhtml side menu
- Nov 14, 2006 - Can dhtml menu script work with tables ?
- Nov 23, 2006 - It is possible to have context menu work with your tree menu dhtml?
- Nov 23, 2006 - Can we right justify the secondary javascript navbar?
- Dec 04, 2006 - With the licensed .js files of menu dhtml the status bar on IE shows "Error on page".
|