| Submenu Reference ¶ | |
| Hi Mihai, This is Ed, one of your happily licensed users. Is there a way to set a reference from one menu to another. For example, your submenu "Company" from the main tool bar is the same as the submenu "Menu / Company" from the side floating menu. In my case I have a couple of menus which are dynamically generated and can be rather big (I already use the lazy setting). I would like to send the submenu definition only once and then attach it to the second menu bar (perhaps replacing a proxy item) after both menus have been created. An easy solution is, of course, just (1) to do a "copy.innerHTML = original.innerHTML" just before creating both menus, but since my menu can be quite big I was looking for a more efficient solution. (2) A second option would be to clone the original sub menu object and attach the copy to the second "invoker" -- not sure how(?). (3) An even better approach is to just assign a reference of the original submenu after it has been constructed to its second "invoker" -- in this case there would be no copy, both menus would invoke the same submenu instance. I presume this can be done because the popup menus must calculate where to popup anyhow. And also because they get triggered by the parent, so all the information is available to enable a popup menu to have two "invokers"... there is even a good chance that it is just a matter of doing the right assign statement. Is there hope? Can you help? Thanks! | |
| last |
| Re: Submenu Reference ¶ | |
| Is there a way to set a reference from one menu to another. Sorry, not at this time, but... For example, your submenu "Company" from the main tool bar is the same as the submenu "Menu / Company" from the side floating menu. In our case it's an workaround. We're cloning the menu UL before passing it to DynarchMenu.setup and thereafter just passing the cloned content again for the left-side menu. You might be right about it being inefficient for large menus. (3) An even better approach is to just assign a reference of the original submenu after it has been constructed to its second "invoker" -- in this case there would be no copy, both menus would invoke the same submenu instance. That's doable and I'll keep it in mind for the next release. Is this feature a big emergency for you? | |
| last |
| Re: Submenu Reference ¶ | |
| I investigated the possibility of cloning menus, and the best I could come up with was to allow an easy way to clone a submenu, but however, there will still be 2 menus defined. The nice thing though is that you can easily define it with: <ul id="foo-bar"> The above creates an item having the label “Foo bar” and having the submenu defined by the UL with the ID “foo-bar”. You can clone it as many times you want. The UL doesn't even need to be a descendent of the main menu UL--it can be defined anywhere in your document, possibly for other purposes than being a menu. ;-) It's as fast as if you would have one UL for each menu, though—I mean, the menu elements are duplicated. The current architecture of DynarchMenu does not allow simply using references. I'll release the new code soon and you will be able to upgrade and test it. | |
| last |
| Lose viewstate when in menu ¶ | |
| Ok, this is getting to be quite frusterating as it has taken me a while to narrow this problem down. Here is the situation: I am using asp.net and I have a dynarchmenu item with a div tag that contains a textbox, dropdownlist and a linkbutton. When you click the linkbutton its onclick handler needs to get the info from the textbox and dropdownlist. This works perfectly well when remove the onload='DynarchMenu.setup("menu");' from the body tag. Problem: When I have it load as a menu the linkbutton submits just fine but the viewstate is lost for the items in the menu. For now I am ignoring the dropdown list and just focusing on getting the content of the textbox to be posted. In javascript console I am also getting an error when i put my cursor over the textbox (only when it is in the menu) Here is that error (not sure if this has anything to do with it as this error is not generated for the dropdownlist: Error: uncaught exception: Permission denied to get property HTMLDivElement.parentNode Right now for testing I have the system in an ascx file and I have 2 copies then loaded into the page, one is loading the menu and the other one just stays a list. The list continues to work as expected but the menu again does not. The list maintains its viewstate when i click the link button from either menu. I have tried switching the textbox to an htmlinput with the runat="server" along with several other variations. Any help would be greatly appreciated. I can post code if necessary but I don't think it is at the moment. Thanks in advance | |
| last |
| Re: Lose viewstate when in menu ¶ | |
| It seems the above mentioned problem is a lot simpler then it seems. After further searching it seems that when the menu is written to the dom it is written at the bottom of the page. This causes a problem when using asp.net as it is then written outside of the form tag and then not handled by asp.net. Mihai, I was wondering if there could be a way to specify an argument in the DynarchMenu.setup function to have the menu written within a specific element. For me that would be the form. This way I could place standard asp.net controls within the menu and use them without any other customization. So basically all I am asking is that the menu would append to a given element instead of only appending to the body. Thanks in advance, | |
| last |
| Using Images in navbar ¶ | |
| First of all, i know, we're using images instead of HTML text and that is an issue in itself. But we have to so my problem is this. When using images in the navbar, first of all it's killing my onmouseover and out calls to an image swap JS function. Second, in IE it's pushing the images in the navbar down one pixel. Any ideas? Thanks! | |
| last |
| New Functionality Contribution ¶ | |
| Hi Mihai, This is Ed again. I sent you an email, but may be you do not monitor that address, plus I have changed a things a bit. I have a small patch that does 4 things: 1) Fixes for a context menu positioning bug. 2) Add a callback interface enabling the customization of context menus based on the object clicked including enabling/disabling menu items and redefining the text/HTML for individual menu items. Done in the menu definition as a class attribute. 3) Add an interface allowing right-justification or bottom-justification of a context menu in relation to the object clicked with it (instead of the mouse position). Done in the menu definition as a class attribute. 4) Add an alternate interface to define on-right-click invocation in the menu definition as a class attribute. It has been tested with IE and Firefox. Would you consider incorporated those into the main source tree? If so, where can I send them to? | |
| last |
| Re: New Functionality Contribution ¶ | |
| Got your mail, the address is fine and I'm watching it. I didn't got to look into it yet, but if you say it's been modified, please send it again to the same address. | |
| last |














