Quick Search
Social Sites
Lotus Community


« How to add non breaking spaces to your XPages | Main | The daily constitutional »
Thursday
Jun252009

Thing learned for the day

I'm sure this is well known already, but it was a new one on me.

I have a web form that has a tabular layout of fields. But at the end of each row is a field that mustn't ever get focus (for reasons that are to boring to go into), so I have an onFocus Javascript event in those fields that immediately blurs the focus if the user tries to get into it. All fine and dandy until you try and tab your way around the table, when you reach the end of each row, we end up with no field having focus.

The thing I learned (was told by an exasperated web designer) is that you can set the "tabindex" of a field to -1. If you do this then it is effectively excluded from the tab order of the form as you use the keyboard to navigate around.

Cue much punching of the sky as we knock another bug off the list for the application I'm working on at the moment. It's the little victories that count!

Reader Comments (2)

Neat Tip! For grins I tried the Notes Client to see if I could set a -1 to the tab order there and get the same results. Nope you can't. -1 just changes the number to 65535 - so it goes last. Oh well..

June 25, 2009 | Unregistered CommenterDavid Leedy

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>