Override tab->change focus browser behaviour in form elements....
Does anyone know if it's possible to override the tab key changing form element focus in text and textarea fields?
For instance, when editing data in a textarea, i want [TAB] to actually insert a tab character, not move focus to the next element.
I specifically want it to work in mozilla browsers, but IE would be nice too. I'm guessing it's not possible as it's behaviour built into the browser, but you never know.
Busy posted this at 22:11 — 17th February 2003.
He has: 6,151 posts
Joined: May 2001
you probably could find a way around it but you shouldn't, the tab is there for a reason and people with screen readers etc rely on the tab to get around sites (some people can't/don't use a mouse).
just make a note saying put \t where they want a tab and use your code to suit.
ROB posted this at 22:59 — 17th February 2003.
They have: 447 posts
Joined: Oct 1999
well yeah i understand that, but this is for my exclusive use. i edit alot of templates through a web form for many sites i manage, yet i have to copy and paste to a text editor (and back) because i can't tab in the textareas.
i'd never try to change such a thing for other users, this is for my own sanity.
dk01 posted this at 23:28 — 19th February 2003.
He has: 516 posts
Joined: Mar 2002
You could probably make an "insert tab" button and then use the CreateTextRange to copy a tab into the form at the mouse position. Never tried it but you might look into it. Sounds like it would only work on version 5.5, 6 browsers.
-dk
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.