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

RE: A little confused about events

Expand Messages
  • Charles
    Oops, nevermind, I get it. Something like: YAHOO.util.Event.addListener(sTempId, click , fnCallback, {oElement: oElement, oElementParams: oElementParams},
    Message 1 of 4 , Jan 31, 2007
    • 0 Attachment
      Oops, nevermind, I get it. Something like:

      YAHOO.util.Event.addListener(sTempId, 'click', fnCallback,
      {oElement: oElement, oElementParams: oElementParams}, true);

      -- Charles


      -----Original Message-----
      From: Charles [mailto:lists07@...]
      Sent: Wednesday, January 31, 2007 8:25 PM
      To: 'ydn-javascript@yahoogroups.com'
      Subject: A little confused about events

      Hey all,

      I have a <div>, and I add a 'click' listener. The callback gets called
      properly, no problem.

      The problem is that for the callback to do what it does, it needs an element
      object and an associative array of parameters. My impression was that I
      could just sent these along, but that doesn't seem to work.

      YAHOO.util.Event.addListener(sTempId, 'click', fnCallback, oElement,
      oElementParams);

      I think I'm having a conceptual problem, and I'd appreciate it if someone
      could straighten me out. I've been looking through the docs, but no
      lightbulb is turning on...

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