any chance to get notification on changing innerHTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nick

    any chance to get notification on changing innerHTML

    Hi All.

    I have a document loaded into browser. Later, I am loading some HTML
    content (using hidden frame) and replace some part of my document with
    new content, using innerHTML property.
    The question is - how can I get notified when my document is changed ?

    Regards,

    Nick
  • Nobody

    #2
    Re: any chance to get notification on changing innerHTML

    Easy. Have your script in the IFrame that is updating its parent call some
    designated change function.

    "nick" <nikolajs1968@y ahoo.com> wrote in message
    news:83e25c9a.0 309030654.7bd7f 8c9@posting.goo gle.com...
    | Hi All.
    |
    | I have a document loaded into browser. Later, I am loading some HTML
    | content (using hidden frame) and replace some part of my document with
    | new content, using innerHTML property.
    | The question is - how can I get notified when my document is changed ?
    |
    | Regards,
    |
    | Nick


    Comment

    • DU

      #3
      Re: any chance to get notification on changing innerHTML

      nick wrote:
      [color=blue]
      > Hi All.
      >
      > I have a document loaded into browser. Later, I am loading some HTML
      > content (using hidden frame) and replace some part of my document with
      > new content, using innerHTML property.[/color]

      I definitively recommend you use DOM node creating-insertion-updating
      methods instead of innerHTML.
      [color=blue]
      > The question is - how can I get notified when my document is changed ?
      >
      > Regards,
      >
      > Nick[/color]

      You can register a DOM mutation event on a node that you know will be
      modified. Right now, the DOMNodeInserted IntoDocument event is not
      reported by any browser I know... but DOMNodeInserted is detected and
      reported accordingly in NS 7.x, Mozilla 1.4+ and Opera 7.20 beta 7. (no
      support in MSIE 6 for WIndows)

      "DOMNodeInserte d
      Fired when a node has been added as a child of another node. This
      event is dispatched after the insertion has taken place. The target of
      this event is the node being inserted."


      Interactive DOM 2 mutation events page:


      DU
      --
      Javascript and Browser bugs:

      - Resources, help and tips for Netscape 7.x users and Composer
      - Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x


      Comment

      Working...