473,796 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2139
Easy. Have your script in the IFrame that is updating its parent call some
designated change function.

"nick" <ni**********@y ahoo.com> wrote in message
news:83******** *************** ***@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
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 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."
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
63611
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, depending on button clicks, etc. Putting this stuff into TEXTAREA and TEXT is simple, but I want to be able to mix font families, weights, sizes, and stuff like that. Thanks for your help.
55
7311
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 function that is called from a button. I think I can use a <div id="t"></div> for this ? Something like
8
3195
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 style very well, because I seem to be having a dreadful time getting to grips with even the simplest things. Currently, I'm trying to change the text that follows a <p> element in a little test program. My test program has a table with two <td>...
16
2132
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 would i do this ??
2
5261
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 purpose here is to avoid iframes. I know how to change the DIV content to other basic html statements, such as basic IMG's or Lists, but I want to put a Javascript into the DIV, and have not found a way to do it.
4
14834
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 update an existing div tag to show what they've typed in? Thanks.
31
4159
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 populating a simple table. I'd like the table to contain 10 entries per page and have the option for the user to scroll through the pages of data without having to go back to refresh the page (I've already pulled all the info I need from the...
1
1140
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 document.body.innerHTML = document.body.innerHTML.replace("alert\(\"no\"\)","alert\(\"yes\"\)"); I can't - how can I get to the section with the javascript in it?
7
1636
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 type="text/JavaScript"> function toggle(o){ o.className = ( o.className == "show" ) ? "hide" : "show";
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9525
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10221
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10169
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.