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 theseitems.
It doesn't delete them completely.
We'll try to fix it in the next versions of Deluxe Menu.
Q: We are using a licenced version of your tree-menu.
Now we have a situation, where we should show the actualclicked menu position with an icon or a color for a collapse tree menu.
A: This can be found with the help of external function of tree menu.
dtreet_ext_userClick(itID, event) - this function is called when clicking a mouse button on the item.
itID - item id
event - standard structure of events generated browser
dtreet_ext_getItemParams (menuInd, itemID) - returns all item parameters.
Please visit http://deluxe-tree.com/functions-info.html for addition information.Q: Can you provide indication on how to apply the cross-frame mode from your html menu builder?
A: You should create your menu in Deluxe Tuner and save your data file.
Then you should open your data file in any text editor and change your
dm_init(); function.
See more info here:
http://deluxe-menu.com/cross-frame-mode-sample.html
Q: What i am doing is a horizontal menu with submenus opening down vertically. The main menu and sub menu has a background image. These are rather large for a menu and when the sub menu expands i want it to stay below the main menu and not go upwards to cover the main menu when the browser window is too small.
A: Yes, they will stay forcibly below the main menu.
You can use Smart Scrollable Feature. In that case sub menus won't cover
the main menu items. You can see an example here
http://deluxe-menu.com/scrollable-submenus-sample.html
You may specify the exact height for submenus, for example:
var smHeight="500px";
Use the following parameters to set the direction for submenus:
var subMenuAlign="left";
var subMenuVAlign="top";
For more info see:
http://deluxe-menu.com/ways-showing-submenus-sample.html