|
|
May I can use PHP code in menu items of my javascript menu drop?
Return to Recent Questions
Q:
May I can use PHP code in menu items of my javascript menu drop?
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 drop 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:
- March 15, 2009 - How can I disable items in dhtml menu samples?
- March 21, 2009 - I am trying to get my submenu to be all black in my down menus in javascript...
- March 30, 2009 - Is there a way to optimize the javascript cascade menu to reduce the loading time for submenus?
- March 31, 2009 - Is there any way can we display submenu items on mouse over in form drop down menu?
- Apr 01, 2009 - How can I set different parameters for diferent items in my popup menu?
- Apr 03, 2009 - I would like to change the height of the submenu items in the menu css html...
- Apr 04, 2009 - Is there a way to have an automatic line-break for large submenu items in css menu hover?
- Apr 06, 2009 - I am trying to use the select javascript in a perl script.
- Apr 06, 2009 - Can the link items NOT open a new window in the dynamic menu javascript?
- Apr 11, 2009 - I cannot see the shadow on the top items in my javascript for drop down menu example.
- Apr 15, 2009 - My mainmenu items are not links. So I need no link cursor for these menu in css items.
|