| Re: Floating Menus, Context on Click, Callback for Disabling Men ¶ | |
| At 2005/06/02 03:11, edhoo wrote: I downloaded the eval version yesterday night and I have to say it; I'm amazed on how straight forward it was to come up with simple menus. Very cool stuff you have put together. Thanks. :-) 1) How do you do the nifty floating menu you have on the left hand side of your site -- I presume it is easy to do with the DynarchMenu, but I did not find an example and the pages on your site are a bit of a challenge to reverse engineer for my limited JS understanding. So a minimalist example like you have for the other features would be cool. Actually that isn't a feature of DynarchMenu. It's very easy to do for browsers that support the CSS “position: fixed” attribute, that is, all but Internet Explorer. For Internet Explorer there is an ugly CSS hack which involves writing the page content in a DIV with "overflow: auto" and including the fixed elements outside that DIV (so we're shifting the scroll area from the BODY to a different element, so that all elements directly inside the BODY will stay fixed). It's easy to find more information. ;-) 2) How do you get the context menu to show up at a mouse click? See right-click functionality is something very few people would expect on the web... cuz it has been so hard to do till the DynarchMenu came about ;-). Anyway, the idea to use the context menu is to simply put an anchor tag that says "options" and when the person clicks on it the context menu shows up. You can assign a context menu on any element for either the right or the left button, or both if you wish (see the context2.html sample). 3) That also means that there would be about 100-200 span/div tags where the context menu(s) could be called from. Would my page be slow to initialize with that many items? I don't think so, unless you have 200 different context menus. Setting up a context menu for multiple elements involves these steps:
4) On the context menu, is there a way to set up a callback function before activation so that we can disable/gray out menu elements that are not applicable to that instance of the div/span? First off, you can create different menus for different elements and assign them all in one function call (see context.html). On the other hand, I do agree that some hook should be called--and it will allow one to dinamically modify the menu by showing/hiding or enabling/disabling items. This hook doesn't yet exist but I can promise you that it will. ;-) 5) Please don't shoot me, but I have to ask... will DynarchMenu work on WebTV "browsers" ? /me is loading the gun... :-p I have no idea if it works on WebTV, but basically, it should work on any browser so long as it correctly respects Web standards (well, and some “oldies but goodies”, like the offsetLeft, offsetTop properties, etc.--which are so widely used that I guess no browser should afford not to support them). | |














