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

Re: [ydn-javascript] Help: YUI Button Menu -> MenuItem Click Event

Expand Messages
  • Todd Kloots
    Michael - Use the Button s getMenu method to retrieve the YUI Menu instance for the Button. From there, you can subscribe to it s click event as detailed
    Message 1 of 3 , Oct 1, 2008
    • 0 Attachment
      Michael -

      Use the Button's "getMenu" method to retrieve the YUI Menu instance for
      the Button. From there, you can subscribe to it's "click" event as
      detailed on the Menu landing page. For example:

      oButton.getMenu().subscribe("click", function (type, args) {

      // Your code here

      });

      - Todd

      Michael She wrote:
      >
      > Hi all,
      >
      > I have setup my Button Menu declaratively using markup as follows:
      >
      > <input type="button" id="DialButton"
      > name="DialButton" value="Dial" />
      > <select id="DialButtonMenu" name="DialButtonMenu">
      > <option value="">Home</option>
      > <option value="">Office</option>
      > <option value="">Mobile</option>
      > <option value="">Other</option>
      > <option value="">Custom</option>
      > </select>
      >
      > How do I capture the menu item click?
      >
      > I tried adding a "selectedItemChange" event to the DialButton, but it
      > captures MouseOvers/Hovers/Outs as well.
      >
      > Anyway to just capture the click (i.e. when Home/Office/Other is
      > selected?)
      >
      > Thanks!!!
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.