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

Event Listener and fields: how to?

Expand Messages
  • Del
    If I have a dropdown field, how do I set up the Listener if the user decides to select something?
    Message 1 of 3 , Aug 30, 2007
    • 0 Attachment
      If I have a <select name="mySelector"> dropdown field, how do I set up
      the Listener if the user decides to select something?

      YAHOO.util.Event.addListener("mySelector", "click", fnCallback);
      doesn't do anything


      and neither does:


      YAHOO.util.Event.addListener("mySelector", "onchange", fnCallback);
    • Del
      YAHOO.util.Event.addListener( mySelector , onselect , fnCallback); and YAHOO.util.Event.addListener( mySelector , select , fnCallback); don t work either
      Message 2 of 3 , Aug 30, 2007
      • 0 Attachment
        YAHOO.util.Event.addListener("mySelector", "onselect", fnCallback);

        and

        YAHOO.util.Event.addListener("mySelector", "select", fnCallback);

        don't work either
      • Gopal Venkatesan
        ... ^^^^^^^^ That should be: YAHOO.util.Event.addListener( mySelector , change , fnCallback); -- Gopal Venkatesan http://gopalarathnam.com/weblog/
        Message 3 of 3 , Aug 30, 2007
        • 0 Attachment
          On Fri, Aug 31, 2007 at 05:21:55AM -0000, Del wrote:
          >
          > YAHOO.util.Event.addListener("mySelector", "onchange", fnCallback);
          >

          ^^^^^^^^

          That should be:

          YAHOO.util.Event.addListener("mySelector", "change", fnCallback);

          --
          Gopal Venkatesan

          http://gopalarathnam.com/weblog/
        Your message has been successfully submitted and would be delivered to recipients shortly.