By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 2,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

Onblur event, javascript

P: 3
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
Share this Question
Share on Google+
4 Replies


acoder
Expert Mod 15k+
P: 16,027
Post your code. Try attaching the event to the text box.
Oct 17 '08 #2

P: 3
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
Expert Mod 15k+
P: 16,027
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
100+
P: 607
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

Post your reply

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