473,804 Members | 3,030 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 1348
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
4190
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
4220
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
1205
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
2632
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
2368
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
1108
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
3568
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
1733
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
9579
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
10571
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, 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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10317
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
10075
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
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
2990
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.