473,499 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Are all events supported in browser

9 New Member
I am trying to attach a "onblur" event on the body element. IE does'nt throw any errors but the event is not captured by the browser when the onblur occurs on the elements withing the body.

But if I attach a "onclick" event. That is captured by the browser.

Any idea ?
Apr 1 '08 #1
5 1194
pronerd
392 Recognized Expert Contributor
I am trying to attach a "onblur" event on the body element.
You would need to check the specific browsers DOM reference to see if that event is supported in the body tag. Even if it is how would that event ever be triggered? The entire page would some how have to lose focus.

The only way I can think of for that to happen would be for you to have content outside of the body tags would would not follow correct syntax, and would risk not being rendered correctly.
Apr 1 '08 #2
connectwithme
9 New Member
Even if it is how would that event ever be triggered? The entire page would some how have to lose focus.
Isn't that the event propogation concept. ex.

<div onClick="someFunction()">
<a href="www.a.com">
<a href="www.b.com">
</div>

If I attach the onclick event to the div then every click on the href element will be captured
Apr 1 '08 #3
mrhoo
428 Contributor
Not all events bubble- focus, blur, scroll, resize, and error do not, nor do most of the advanced events- mutation, textrange, treewalker.


To get a complete list, get a good book or find a good tutorial.
Apr 1 '08 #4
mrhoo
428 Contributor
Excuse me- I seem to have stuttered.
Apr 1 '08 #5
pronerd
392 Recognized Expert Contributor
Isn't that the event propogation concept. ex.

<div onClick="someFunction()">
<a href="www.a.com">
<a href="www.b.com">
</div>

If I attach the onclick event to the div then every click on the href element will be captured
This is exactly my point! Since all content in a properly formated HTML page goes inside the body tag, it does not matter what you click on or move the mouse to. The focused element(s) will always be inside the body tag so it should always contain the focused element.

[HTML]
<body onBlur="someFuntion()" >
<span>Blah Blah Blah</span><br /><br /><br />
<span>Blah Blah Blah</span><br /><br /><br />
<span>Blah Blah Blah</span><br /><br /><br />
<span>Blah Blah Blah</span><br /><br /><br />
</body>
[/HTML]
Apr 1 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
9703
by: Marek Mand | last post by:
How to use generated keyboard events? What I am trying here to do is in onkeyup event handler http://www.hot.ee/idaliiga/braggart/createEventTest.htm generate a (shift)TAB keydown so the...
5
2345
by: knocte | last post by:
Hello. I am a web developer very worried about "bloat code" and "languages mixture". So, since some time, I always try to avoid completely the use of javascript in XHTML/HTML files. This leads...
9
1649
by: Lachlan Hunt | last post by:
Hi, I've written some javascript to implement DOM 2 Events in IE (addEventListener, removeEventListener, etc) and I would like to know which browsers it works in. I've tested it in Firefox 1.0.6,...
8
2874
by: JPRoot | last post by:
Hi M. Jeffrey Tan, Just hopping you didn't forget me? :) Thanks JPRoot ----- \"Jeffrey Tan\" wrote: -----
3
2952
by: David A. Mathew | last post by:
I noticed when trying write an application for PocketPC and deciding to program in VB or C# that for event handling VB seems to have more options than C#. Specifically I want to be able to respond...
12
2760
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
11
2971
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
2
5841
by: =?Utf-8?B?c25naWxi?= | last post by:
The WebBrowser control is described as exposing numerous public mouse events. See: http://msdn2.microsoft.com/en-us/library/ayestehw.aspx. many of the event are described as: "This event is not...
3
4911
by: MikeK | last post by:
Ok, I've been noodling with this for several days now and I'm starting to go crazy. Does Apple's Safari browser support drag events on Textarea elements? The few specs and docs I've found seem to...
2
4206
by: Lazarus | last post by:
Hi, I have a canvas that reacts to mousedown and mousemove. Once I click the canvas I want to track the cursor wherever it goes, including outside the browser. Setting window.onmousemove only...
0
7130
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,...
0
7007
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
7386
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...
0
5468
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,...
0
4599
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...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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 ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
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...

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.