• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Disable/Enable tab key

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i am having an input filed to which the YUI autosearch is bind.
I need the tab key event in this field to be disabled till the search result is returned ( not being able to use the TAB key to go to the next input filed before the search result returns )
and when there s a selection being done( this should be able even by the TAB key ) from the list the tab key being enable, so that can navigate to the next field using the TAB key.


thanks in advance
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, consider other approaches before reducing accessibility and usability. It isn't nice to "trap" the user in a field. What if the internet connection goes down and the search results don't get returned?

Why "only" disable the tab key? What if the user clicks outside the field? If you really want to do this, I think it would be better to use the onBlur event to prevent leaving the field at all rather than just via the tab key.
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic