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

Watch page changes

How can I detect when a TAG is included dinamically to my page to do
some actions using that TAG?

Jul 3 '06 #1
2 1678


Juliano.net wrote:
How can I detect when a TAG is included dinamically to my page to do
some actions using that TAG?
W3C DOM Level 2 Mutation events are supported by Mozilla and Opera.
For instance the DOMNodeInserted event

if (typeof document.addEventListener != 'undefined') {
document.addEventListener(
'DOMNodeInserted',
function (evt) {
alert('Inserted ' + evt.target + ' into ' + evt.relatedNode);
},
false
);
}

See the W3C DOM Level 2 Mutation Events specification
<http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 4 '06 #2
Martin, is there any way to do this with Internet Explorer?

And, do you know any JavaScript debugger that has step by step
execution and expression/variable watch?

Martin Honnen wrote:
Juliano.net wrote:
How can I detect when a TAG is included dinamically to my page to do
some actions using that TAG?

W3C DOM Level 2 Mutation events are supported by Mozilla and Opera.
For instance the DOMNodeInserted event

if (typeof document.addEventListener != 'undefined') {
document.addEventListener(
'DOMNodeInserted',
function (evt) {
alert('Inserted ' + evt.target + ' into ' + evt.relatedNode);
},
false
);
}

See the W3C DOM Level 2 Mutation Events specification
<http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 9 '06 #3

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

Similar topics

3
by: Premshree Pillai | last post by:
Hello, I recently posted a simple Python script--Watch That Post--that lets you watch a URL for any changes. I wrote it to watch posts on LiveJournal, but it can watch any URL. It's at...
3
by: jason | last post by:
Does anyone have any ideas on a PAGE WATCH tool or an application that allows a user to be notified when page changes automatically by email. My immediate thoughts would be to use the FSO object...
1
by: et | last post by:
How do I add a watch, using asp.net in visual studio, to stop the program when a value in a drop down list changes? I can add a watch through Debug, windows, watch, but there doesn't seem to be a...
0
by: eBob.com | last post by:
I have an array Dim FileInfo(MaxFiles) As OFI of Structure Structure OFI 'OneFileInfo Dim Displayed As Boolean ... Dim Dirname As String
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.