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

non bubling events

Hello all,

In IE, when an event occurs, as long as it returns true, and
cancelBubble is not set, the event will bubble up through the elements
in the DOM tree.

Though, there is at least one event that does not bubble... the onLoad
event.

For instance:
<BODY onLoad="alert('body onload')">
<IMG src=img.gif onLoad="alert('img onload');">
<SCRIPT>alert("TEST");</SCRIPT>
</BODY>

will show : "img onload", "test", "body onload".

This prooves that the onLoad event did not bubble, even if true is
returned and cancelBubble == false.

Of course, this makes sense. Just because the image has loaded, does
not mean that entire page has loaded.

So, here is my question:
In what other cases are events not bubbled? Is there a pattern? Or is
this the only case?

Thanks,
Brian

Jul 20 '05 #1
1 1660


Brian Genisio wrote:

In IE, when an event occurs, as long as it returns true, and
cancelBubble is not set, the event will bubble up through the elements
in the DOM tree.

Though, there is at least one event that does not bubble... the onLoad
event.

For instance:
<BODY onLoad="alert('body onload')">
<IMG src=img.gif onLoad="alert('img onload');">
<SCRIPT>alert("TEST");</SCRIPT>
</BODY>

will show : "img onload", "test", "body onload".

This prooves that the onLoad event did not bubble, even if true is
returned and cancelBubble == false.

Of course, this makes sense. Just because the image has loaded, does
not mean that entire page has loaded.

So, here is my question:
In what other cases are events not bubbled? Is there a pattern? Or is
this the only case?


For IE, check the docs at
http://msdn.microsoft.com/library/de...nce/events.asp
they tell you which events bubble.

For DOM compliant browsers, check the W3C DOM Events specification at
http://www.w3.org/DOM/, it also lists which events bubble.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

5
by: Vince C. | last post by:
Hi. I'd like to trap ADO Recordset object events in my ASP script (either VBS or JS, no preference). I've tried (in VBS) writing a Sub rs_RecordChangeComplete( adReason, cRecords, pError,...
8
by: Edward Diener | last post by:
Is it possible for a derived class to override a property and/or event of its base class ?
3
by: Sasha | last post by:
Hi everyone, Here is my problem: I have the following classes: - DataNode - this class is designed to hold some data and will be contained in a tree like data structure DataTree. When...
6
by: Saso Zagoranski | last post by:
Hi! How can I unregister all the events registered to a control? I have seen a piece of code in another thread, which gets all the registered handlers for a specific event. Let's say I have a...
14
by: JPRoot | last post by:
Hi I use the following syntax to have events inherited from base to child classes which works nicely (virtual and override keyword on events). But I am wondering if it is a "supported" way of using...
4
by: LP | last post by:
Hello! I am still transitioning from VB.NET to C#. I undertand the basic concepts of Delegates, more so of Events and somewhat understand AsyncCallback methods. But I need some clarification on...
11
by: Nicky Smith | last post by:
Hello, I'm studying a book on VB.net Win apps, and I'm reading a section on events and delegates and raising events. Is it just me, or is this not just subs dressed up as something else? I...
14
by: xoozlez | last post by:
Hi there, I have a registration form where I like to filter out the past events of 2007. This is the code I am using : strSQL = "SELECT EventID, EventName, EventDateBegin, EventDateEnd,...
1
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
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,...

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.