473,830 Members | 2,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Onblur event, javascript

3 New Member
hi
i have attached onblur event to document body. but at run time when i move out of one text box to another text box in that doc its not firing the event.
please help
Oct 17 '08 #1
4 1983
acoder
16,027 Recognized Expert Moderator MVP
Post your code. Try attaching the event to the text box.
Oct 17 '08 #2
chiru
3 New Member
Post your code. Try attaching the event to the text box.
i have lots of elements in the document which was loaded in an IFrame

how? help me out
Oct 17 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
If you want it to trigger on the text box losing focus, you need to attach/add it to each text box.
Oct 17 '08 #4
RamananKalirajan
608 Contributor
i have lots of elements in the document which was loaded in an IFrame

how? help me out
The reason why you are not getting the result is the whole body is taken as a object. Once u click a child or focus on a child after clicking the body ur code will be working the reason is the body loses its focus. You cant expect this logic to be working perfect as per ur requirement. The best way is adding the function call on onfocus of every object or onblur of every object. If u have any doubts post it back. All the best.

Regards
Ramanan Kalirajan
Oct 17 '08 #5

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

Similar topics

1
16612
by: Barry Svee | last post by:
I'm struggling with the JavaScript blur event. I have an activex control that I need to interact with when a window loses focus, namely to instruct it to give up control of a barcode scanner so that the application being brought foreward can take control. It has been my observation that when I set the window.onblur function, the window will gain focus and then immediately lose focus (blur) to the first field, button, or whatever that is...
2
3736
by: D. Alvarado | last post by:
Hi, I'm having some trouble with the "onBlur" event in the BODY tag. Ideally, what I want to happen is that when someone leaves window A, window A executes a command. I had put <body onBlur="savePage();"> I have a couple of problems. On IE 6 (win2000), whenever I put the cursor focus on a textfield within window A, the "savePage" function is invoked. And on Mozilla Filefox 0.9.1, the event never launches even when I leave the...
4
7607
by: Peloux | last post by:
Hi, I have written some htc in order to validate data in a form. most of htc are attached on 'onblur' event. Now, we would like to use the Enter Key to sublit form, so we use the following code : ----------- <SCRIPT> function touche_EnterKeyPress(){
2
11466
by: andyalean | last post by:
Hello javascript coders :( ,I am trying to add an onblur event to my code. This is where I dynamically create a textfield.I want to assign it an onblur event handler like so.How do I add a event to a newly created option text field.Thanks :D for( ;k < holdHalfHours; k++ ){ timeLog.appendChild(br); l = k +1;
2
5697
by: Heiko Vainsalu | last post by:
Hi Hope somebody knows how to solve this one. *The Situation* A traditional situation where HTML form inputs are checked... (if simplified then it would look something like this) <form onSubmit="return checkWholeForm(this)">
1
5680
by: neil S via DotNetMonster.com | last post by:
I have a custom control with a textbox and dropdown list. The dropdown list is hidden and acts as a data source for the textbox. When the user enters text in the textbox, an onKeyup event is fired and retrieves the first value from the dropdown list equal to that entered, and fills the text box. Essentially, the two together are acting as a type ahead/autocomplete thingy. All this works fine. Here's my problem: I wanted to expose the...
4
11883
by: josh.dutcher | last post by:
I'm trying to set up a simple "change your password" form. I've got an AJAX process that is checking the new password the user enters against their current password to make sure they're changing it. This function is firing via the password field's onBlur event handler. I want to do some other form validation using the form's onSubmit handler (onSubmit="return validateForm();", and if all those conditions are met, the form submits. ...
5
3098
by: lindanr | last post by:
In ASP.NET 2005 I have an onblur="window.close()" javascript event in the <body> tag. When I click on the window's scrollbar, the window closes. The same code works fine in ASP.NET 2003. Any ideas?
0
1345
by: =?Utf-8?B?c21heQ==?= | last post by:
I'm having trouble with a datagrid in an UpdatePanel that includes a user control in the footer and edit rows. The user control references a js file that initializes an onblur for the textbox it contains. This is fine when the page loads however after clicking the add button, the update panel refreshes showing me the row I added and a new footer, but the code contained in the onblur function has been added to the page's javascript as if...
2
4711
by: wolverine | last post by:
Hi All, In Mozilla Firefox, to onblur and onfocus event of each and every html element, the browser itself will attach a native event handler. I mean if you type, 'javascript:alert(window.blur)' in the address bar of Firefox browser, you can see a 'function ....' . That is a Firefox browser defined handler. Now assume that web developer also attach event handlers to 'onblur' events eg: 'window.blur=f3()'
0
10774
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
10491
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
10526
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
6951
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
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
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
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
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.