|
|
The problem I want to solve is to remove the entire menu dinamico dhtml, in order to rebuild it dynamically.
Return to Recent Questions
Q:
We are registered users of the Deluxe Menu software. Today I tried to
use the Javascript API, but there is something I do not understand and
want to ask for support.
First, I set up a very simple menu:
var menuItems=[
['Menu 1'],
['|Submenu 1'],
['Menu 2'],
['|Submenu 2'],
];
This menu is built via dm_init().
Then, I inspect the menu (in Firebug):
>>> dm_ext_getSubmenuParams(0, 0)
["dm0m0", 2, "", 0, 1]
>>> dm_ext_getSubmenuParams(0, 1)
["dm0m1", 1, "dm0m0i0", 1, 0]
>>> dm_ext_getSubmenuParams(0, 2)
["dm0m2", 1, "dm0m0i1", 1, 0]
Ok, there are three submenus. Now I am going to delete one of them:
>>> dm_ext_deleteItem(0, 0, 1)
"Menu 2" disappears on the screen, this works as expected. But now when
I re-inspect the menu using the API, I find that the API reports exactly
the same as before:
>>> dm_ext_getSubmenuParams(0, 0)
["dm0m0", 2, "", 0, 1]
>>> dm_ext_getSubmenuParams(0, 1)
["dm0m1", 1, "dm0m0i0", 1, 0]
>>> dm_ext_getSubmenuParams(0, 2)
["dm0m2", 1, "dm0m0i1", 1, 0]
So, it seems the report function continues to know about the original
menu structure and reflects it. Am I using the API in a wrong way?
The problem I want to solve is to remove the entire menu dinamico dhtml, in order to
rebuild it dynamically. Because I did not see a function aimed to this
functionality, my plan was to delete all main menu entries subsequently
until the main menu inspector no longer reports an entry. Is there (a
better) way to achieve this?
A:
Unfortunately, dm_ext_deleteItem() only change visibility of these
items.
It doesn't delete them completely.
We'll try to fix it in the next versions of Deluxe Menu.
Return to Recent Questions
Related:
- Sep 26, 2006 - Is there a way to change the height of the main buttons in my simple dhtml menu.
- Oct 27, 2006 - In IE 6.0 and Firefox 1.5.0.4, the submenus of my dhtml dropdown menu are not visible
- 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?
- Dec 04, 2006 - With the licensed .js files of menu dhtml the status bar on IE shows "Error on page".
- Dec 11, 2006 - How to add the new items to the dhtml vertical menu without using two data.js files?
- Dec 14, 2006 - How to use a dhtml javascript menu item so that it opens a window at a certain size?
- Dec 22, 2006 - dhtml submenu doesn't appear over the Flash animation in IE...
- Jan 18, 2007 - Will this dhtml context menu rollout from within an iframe over a regular frame
|