Connecting Tech Pros Worldwide Forums | Help | Site Map

any chance to get notification on changing innerHTML

nick
Guest
 
Posts: n/a
#1: Jul 20 '05
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
Guest
 
Posts: n/a
#2: Jul 20 '05

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@yahoo.com> wrote in message
news:83e25c9a.0309030654.7bd7f8c9@posting.google.c om...
| 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


DU
Guest
 
Posts: n/a
#3: Jul 20 '05

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 DOMNodeInsertedIntoDocument 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)

"DOMNodeInserted
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."
http://www.w3.org/TR/2000/REC-DOM-Le...-MutationEvent

Interactive DOM 2 mutation events page:
http://www10.brinkster.com/doctorunc...ionEvents.html

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Closed Thread