473,396 Members | 1,784 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,396 software developers and data experts.

document events

Hi,

I've got several places on page where I'm using the following method
document.createElement to create a new element.

Is there an event that I can attach to which is fired every time a new
node/element added to the DOM using this method.

Thanks in advance

Feb 9 '06 #1
1 1325
VK

Ko***********@gmail.com wrote:
Hi,

I've got several places on page where I'm using the following method
document.createElement to create a new element.

Is there an event that I can attach to which is fired every time a new
node/element added to the DOM using this method.


If *you* are using document.createElement (and not some subnatural
force :-) then what prevents you to call the necessary function?

Also note that createElement doesn't add an element to the DOM. It
*creates* an element you can add later to the DOM using say appendChild
method.

....
var obj = document.createElement('DIV');
....
notifyListener(document.body.appendChild(obj));
....

function notifyListener(obj) {
// do what you want
}

If there is some extra specifics in your situation then please explain
it.

Feb 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pow67 | last post by:
Javascript beginner would like to create one Web page from the contents of three other pages. This does not work: ...
1
by: zoltix | last post by:
Hi, I am beginner in JavaScript. I would like to intercept all click events on my document. I use this function for that document.onmousedown=click;. It works well. But I would like to...
1
by: Csharper95 | last post by:
I am currently working on completing a program that someone else started. The problem (when the program is running): When more than one document/file is opened, the mouse changes the active...
16
by: John Gabriel | last post by:
The *back* and *forward* butttons do not work. Anyone noticed this? I know this is a beta edition but even for a beta edition, it's hard to believe Microsoft performed any real quality...
6
by: sylcheung | last post by:
Hi, How can I be notified when the document load is complet in JavaScript? I am referring to the whold document load is complete, mean all images/external files/frame/iframes have been loaded. ...
1
by: ABC | last post by:
If there have a page which have unknown '<div>' label or may be no any controls. I want add 'onclick' events to call server event to do something. But there are no any events of 'Document' object...
9
by: PJ6 | last post by:
AJAX is great but I'd like to prevent users from clicking anything again and causing more actions to happen while the server is working on the current request without changing the contents of the...
4
by: ctchrinthry | last post by:
I have some large and complex XML documents. I want to return the whole document with some sections trimmed away. Right now, i read the whole document into some python code, walk the tree, snip...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.