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

Re: Fire Event when Div content changes

Expand Messages
  • Caridy PatiƱo Mayea
    Hello Chris, To change the DIV s content you always need a div s manager (a script to management the DOM element), if you use the Dispatcher extension, you has
    Message 1 of 4 , May 14, 2007
    • 0 Attachment
      Hello Chris,

      To change the DIV's content you always need a div's manager (a script
      to management the DOM element), if you use the Dispatcher extension,
      you has a simple way to do what you need:

      Example:
      http://bubbling.comarq.com/themes/bubbling/examples/plugin-dispatcher-dynamic-contents.html

      Loading the new content thru ajax:
      YAHOO.util.Dispatcher.fetch (
      'div_id_or_reference',
      'new_remote_content.html',
      {
      before: function () {},
      after: function () {}
      }
      );


      Define the new content manually:
      -----------------------------
      YAHOO.util.Dispatcher.process (
      'div_id_or_reference',
      'new innerHTML content for the DIV in XHTML',
      {
      before: function () {},
      after: function () {}
      }
      );

      Use the "before" and "after" functions to define you behaviors...

      Reference:
      ----------
      Dispatcher full explanation here:
      http://bubbling.comarq.com/eng/node/dispatcher/

      note: keep in mind that the dispatcher also execute the scripts tags
      right after the content's change and before the method "after"
      specified by the user.

      Regards
      Caridy (caridy at gmail.com)
      http://bubbling.comarq.com/

      --- In ydn-javascript@yahoogroups.com, "ctrlspace2706"
      <chris.huisman@...> wrote:
      >
      > Hello,
      >
      > Is there a way to fire an event when the content of a div changes?
      >
      > Chris
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.