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