473,560 Members | 2,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

document events


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 1338

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

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

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

Feb 9 '06 #2

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

Similar topics

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.
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().
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...
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...
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.
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?
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
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...
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...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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...

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.