473,379 Members | 1,201 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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
Jul 20 '05 #1
2 2122
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Free-Ed, Ltd. | last post by:
I am going nuts trying to find a paragraph in a book that described how to change the text content (HTML) in a DIV. Actually I have an array of HTML strings that I want to drop into the DIV,...
55
by: Ton den Hartog | last post by:
Stupid basic question but I find it horribly imposible to find the answer elsewhere... :-( I want to have a piece of text in my HTML page and want to be able to change it in a Javascript...
8
by: Margaret MacDonald | last post by:
I'm a js novice trying to teach myself. I'm using Flanagan's 'Javascript, the definitive guide' from O'Reilly as a text. But either I'm dopier than usual or its layout doesn't match my learning...
16
by: chris | last post by:
im new to javascript but slowly getting better what i want to do is have some text on the screen and when an event happens for example click a button the text would change to what i want. how...
2
by: rpesq | last post by:
Hi, I Need help changing the content of a DIV. I sincerely researched the issue and have not found a solution except to scrap the idea and stick with the iframe code that I had been using. My...
4
by: engwar | last post by:
I'd like to know if it's possible to change the contents of a div tag based on something the user is doing. For example. If there is a text box on a page and the user types his or her name can I...
31
by: Greg Scharlemann | last post by:
Given some recent success on a simple form validation (mainly due to the kind folks in this forum), I've tried to tackle something a bit more difficult. I'm pulling data down from a database and...
1
by: Jarry | last post by:
If I take a website that has body text and <scripttags, I can do: document.body.innerHTML = document.body.innerHTML.replace("no","yes"); but if i want to change the script as such ...
7
by: wkeithwork | last post by:
I'm pulling my hair out... I have a few radio boxes where a user can choose different options and I want to show an explanation of each option after it's clicked. Here's what I have: <script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.