Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: disabling a menu

Expand Messages
  • Todd Wells
    Your method worked where mine didn t (don t know why). On Mon, Jun 30, 2008 at 4:40 PM, wally.ritchie
    Message 1 of 5 , Jun 30, 2008
    • 0 Attachment
      Your method worked where mine didn't (don't know why). 

      On Mon, Jun 30, 2008 at 4:40 PM, wally.ritchie <wally.ritchie@...> wrote:

      --- In ydn-javascript@yahoogroups.com, "Todd Wells" <ttopwells@...> wrote:
      > I want to clarify what is meant here... I have a menu bar with two
      menus --
      > Project and Test Pass, each of which have a number of items on it.
      I'd like
      > to disable Test Pass in some situations, either from it being
      selected at
      > all or, as an alternative, having any of it's items selected. With the
      > method I was trying, neither was happening. How can I disable the
      item on
      > the menubar?
      > On Mon, Jun 30, 2008 at 1:35 PM, wally.ritchie <wally.ritchie@...>

      > wrote:
      > > I use:
      > >
      > > testPassMenu.cfg.setProperty("disabled", true);
      > >
      > > although what you are doing should also work - it does for me.
      > > Make sure that what you want is the second "Submenu", not the second
      > > item on the barmenu. Disabling the submenu shows no visible change on
      > > the bar but the items in the submenu itself will be disabled and
      > > unselectable.
      > >
      What you are doing should work. Make sure that you are using the
      barmenu object for the getSubmenus() call and not a menu item. Try an
      alert or firebug to make sure you are working with the right objects.
      The setProperty will add the class "disabled" to a division that is a
      child of the menubaritem containing the submenu.

      It's also possible you have a timing problem. I believe that the menu
      has to be rendered before you can disable it.

    Your message has been successfully submitted and would be delivered to recipients shortly.