By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,480 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,480 IT Pros & Developers. It's quick & easy.

any chance to get notification on changing innerHTML

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Easy. Have your script in the IFrame that is updating its parent call some
designated change function.

"nick" <ni**********@yahoo.com> wrote in message
news:83**************************@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
Jul 20 '05 #2

P: n/a
DU
nick wrote:
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.
I definitively recommend you use DOM node creating-insertion-updating
methods instead of innerHTML.
The question is - how can I get notified when my document is changed ?

Regards,

Nick


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

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.