(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    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:
Beautiful Slider jQuery Application Great Free Page Layouts Set  |  Prime Simple Website Builder Review  |  Super Simple Website Builder Review  |  Fine Bootstrap Page Templates - Video List  |  Exceptional MP4 to HTML5 Converter Review  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. AI Website Builder | Free AI Website Builder | Free AI Website Generator | AI web design generator | AI web page design generator