Does the tab key override the onblur event?

  • Thread starter Rithish Saralaya
  • Start date
R

Rithish Saralaya

Does the tab key override the onblur event? I have a text field whose
input I validate on blur, and set the focus back again if invalid.
Effectively, I do not want the user to move out of the control unless
the data entered is validated. This works fine, when I try to click on
some other control. However, on tabkey press, the onblur does get
fired, but the focus also moves onto the next control. It gives a user
experience of hopping onto the next control and coming back again to
the current. I believe tab key is a system key, and it cannot be
overridden. But, should it not move out only after the necessary event
executions?

Any suggetions would be greatly appreciated.

I am using IE 6.0 for my tests.

Regards,
Rithish.
 
R

Rithish Saralaya

[snip]
So stop f**king
[snip]
I asked for suggestions.. Not abuses..


[snip]
and look to a better strategy for validating input.
[snip]

My belief was that the best way to validate input would be on fire of
the onblur event. If you have a better strategy of validating input,
then do please oblige..


[snip]
What are your users using? ..and

Will they be prepared to switch off JS so they can use your site
the way *they* want to, or is yout site a 'back-button job' like
most others that mess with the user's browser?
[snip]

This is for an intranet system and my users ARE also using IE 6. They
want a validation of the input and hence WILL not switch of JS in
their browsers.


[snip]
Those are perhaps the questions you *should* be asking.
[snip]

My questions have not been answered in any case.
Does the tab key override the onblur event?
I believe tab key is a system key, and it cannot be overridden. But,
should not the focus move out only after the necessary event
executions?


Regards,
Rithish.
 
R

Randy Webb

Rithish said:
[snip]
So stop f**king

[snip]
I asked for suggestions.. Not abuses..

Welcome to Usenet, c.l.j in particular
[snip]
and look to a better strategy for validating input.

[snip]

My belief was that the best way to validate input would be on fire of
the onblur event. If you have a better strategy of validating input,
then do please oblige..

Use the onchange event instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top