473,703 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

document events

Hi,

I've got several places on page where I'm using the following method
document.create Element 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 1343
VK

Ko***********@g mail.com wrote:
Hi,

I've got several places on page where I'm using the following method
document.create Element 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.create Element (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.create Element('DIV');
....
notifyListener( document.body.a ppendChild(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
4184
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: javascript:document.write.url.("http://www.myWEB.com/Events/A1_Cal_ALD_Events_1.html", "http://www.myWEB.com/Events/A1_Cal_ALD_Events_2.html", "http://www.myWEB.com/Events/A1_Cal_ALD_Events_3.html") Suggestions appreciated.
1
4199
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 continue the execution code on a other button or anything else. Example 1) Click anywhere intercept click->Execute the code in function click().
1
1201
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 window simply by moving it (the mouse pointer) over the work area (not the title bar) of one of the open windows. When of course, it's supposed to activate when there is a mouse click on the inactive window. In the Program:
16
2625
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 control.... *Help* is pretty important. The help feature topics are very badly organized. There is ambiguity and context disorder. The topic headings are misleading and a lot is assumed about the knowledge of the user. Example, *managed code" is...
6
2361
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. I think there is a window.addEventListener() function but I am not sure which event to listen to. Thank you.
1
1100
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 on properties windows under VS IDE. How should I to do?
9
3563
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 page. I already set the pointer to a wait cursor. What's the best way to disable OnMouseDown document-wide? Paul
4
1731
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 the nodes that i don't want anymore, then dump the whole tree out. It seems that it would be better to use an XML database and XQUERY to do this. However, the large XML document has a large and changing structure. I have to do this over a...
0
8743
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
8659
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,...
1
8993
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
7843
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4417
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
4674
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3111
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
2
2422
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2054
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.