|
|
I am looking for a way to dynamically affect the contents of menu javascripts..
Return to Recent Questions
Q:
I recently purchased DeluxeMenu for a project I'm working on and a new
requirement has been submitted. I am looking for a way to dynamically affect
the contents of menu javascripts after it's been rendered(displayed) in the browser.
Can this be accomplished with this component?
A:
1) You can use API functions to affect items dynamically:
http://deluxe-menu.com/functions-info.html
2) Generate your menu items dynamically from database.
Unfortunately we don't have working example with ASP.
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) 2008, 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:
- Feb 26, 2007 - Does your dhtml treeview support right to left languages, like Hebrew?
- May 21, 2007 - How are the dhtml drop down menus affected if javascript is not enabled?
- April 21, 2009 - I now wish to dynamically change the drop down menu in html parameters.
- Jun 10, 2009 - How I have to do to add the content in each javascripts menu tab?
- Jun 28, 2009 - How do I correctly generate "SE-Friendly Code" if I have 2 menu in javascripts?
- Jul 16, 2009 - I am having some difficulty dynamically adding items to a tree javascript and menu.
- Aug 04, 2009 - I want to dynamically load the drag drop menu.
- Aug 30, 2009 - It is only with the java swing drop down menu because there are words that doesn't show the correct letters / characters I am encoding..
- Sep 14, 2009 - I was trying to add the functionality of dynamically adding net dhtml menu item..
- Oct 18, 2009 - The problem I want to solve is to remove the entire menu dinamico dhtml, in order to rebuild it dynamically.
- Nov 29, 2009 - Expandable javascript menu doesn't actually affect the plus/minus icon I have specified.
|