473,624 Members | 2,275 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 1211
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="someFu nction()">
<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="someFu nction()">
<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="someFun tion()" >
<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
9723
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 focus would move to the (previous/next ) input element. --
5
2349
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 to me to hate, also, any event (onload, onchange, ...) instanciated in the element tag itself, like: <input type="text" onkeyup="return doSomething();" /> I would replace this code above with an input element marked with an
9
1655
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, Deer Park Alpha 2, Opera 8.02 and IE6 and IE7 Beta 1, all on WinXP SP2. Could some of you please take a look at the test pages in any browser you have available to you, and let me know if it works or if you encounter any problems? If...
8
2886
by: JPRoot | last post by:
Hi M. Jeffrey Tan, Just hopping you didn't forget me? :) Thanks JPRoot ----- \"Jeffrey Tan\" wrote: -----
3
2956
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 to mouse clicks on a pictureBox control. VB clearly has a _click event for pictureboxes amoung many other events, However C# only had one event... something like _parentChanged and that was it. Is there a way I can add event handlers like _click...
12
2783
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 when menu items are clicked.Besides these i would like to put a custom status bar. Any error message encountered in any of the webpage will be displayed in the banner. The problem iam encountering is how to access the customer status bar in child...
11
3002
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. It works perfectly (assigning the correct images and the correct onclick events to the correct <atags):
2
5849
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 supported by this control. (inherited from WebBrowserBase)". Does this mean that I can't access these? I am using VS Express C#. Otherwise how do I capture webBrowser mouse events? I am trying to have a DISPLAY-ONLY browser window (i.e. no...
3
4923
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 indicate that it does but I can't get it to work for the life of me. I've tired everything I can think of to try get notifications for the events: ondragenter ondragleave ondragover ondrop
2
4216
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 gives events inside the browser of course. I tried window.captureEvents which works on Safari but FireFox says it's deprecated. Mozilla's docs say to use window.addEventListener but the behavior is the same: in Safari I can drag outside the window and...
0
8242
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8177
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
8681
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...
0
8629
jinu1996
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
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
8488
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
2611
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
1
1793
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1488
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.