popup selection listener - Mozilla

This is a discussion on popup selection listener - Mozilla ; hi all, good day. Is it possible to add a listener for an item selection event on a popup? For example, a listener to react when a menuitem is selected within a menupoup? Something like the "select" for listboxes or ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: popup selection listener

  1. popup selection listener

    hi all, good day.

    Is it possible to add a listener for an item selection event on a
    popup?
    For example, a listener to react when a menuitem is selected within a
    menupoup? Something like the "select" for listboxes or trees? Or do I
    have
    to add a DOMMenuItemActive / DOMMenuItemInactive to each menuitem?

    cheers
    m


  2. Re: popup selection listener

    marco.donizelli@gmail.com wrote:

    >Is it possible to add a listener for an item selection event on a popup?
    >For example, a listener to react when a menuitem is selected within a menupoup? Something like the "select" for listboxes or trees? Or do I have to add a DOMMenuItemActive / DOMMenuItemInactive to each menuitem?
    >
    >

    Menuitems work like buttons; they send command events when you click
    them. Or am I misunderstanding you?

    --
    Warning: May contain traces of nuts.

  3. Re: popup selection listener

    marco.donizelli@gmail.com wrote:
    > hi all, good day.
    >
    > Is it possible to add a listener for an item selection event on a
    > popup?
    > For example, a listener to react when a menuitem is selected within a
    > menupoup? Something like the "select" for listboxes or trees? Or do I
    > have
    > to add a DOMMenuItemActive / DOMMenuItemInactive to each menuitem?
    >


    Those events are fired when a menuitem is highlighted, not where the
    user activates a command from the menu. If you want the latter, you
    should use the command event. All of the events bubble though, so adding
    a listener to the menupopup should be sufficient.

  4. Re: popup selection listener

    gotcha, thanks a lot as usual neil.

    marco

    On 17/10/2007, Neil Deakin wrote:
    > marco.donizelli@gmail.com wrote:
    > > hi all, good day.
    > >
    > > Is it possible to add a listener for an item selection event on a
    > > popup?
    > > For example, a listener to react when a menuitem is selected within a
    > > menupoup? Something like the "select" for listboxes or trees? Or do I
    > > have
    > > to add a DOMMenuItemActive / DOMMenuItemInactive to each menuitem?
    > >

    >
    > Those events are fired when a menuitem is highlighted, not where the
    > user activates a command from the menu. If you want the latter, you
    > should use the command event. All of the events bubble though, so adding
    > a listener to the menupopup should be sufficient.
    > _______________________________________________
    > dev-extensions mailing list
    > dev-extensions@lists.mozilla.org
    > https://lists.mozilla.org/listinfo/dev-extensions
    >


+ Reply to Thread