What's the best way to prevent the tab key from shifting focus away from a
textbox, but rather insert the tab character? Do I just do it the obvious
way with JavaScript or is there some simple property to set?
PaulPJ6 wrote:
> What's the best way to prevent the tab key from shifting focus away from a
> textbox, but rather insert the tab character? Do I just do it the obvious
> way with JavaScript or is there some simple property to set?
> Paul
I'd simply change the textbox to a "multiple line" textbox also known
as the textarea in HTML forms. You can have a textarea in same height
as a textbox so the design doesn't get crushed by it. The textarea
supports the tab character and you're done :)
-Kevin
Um... already have a multiple line textarea. Tab still alters focus. Is it
just an IE problem?
Paul
"Kevin Steffer [MCP]" <ksteffer@.gmail.com> wrote in message
news:1133899279.462906.116050@.g44g2000cwa.googlegroups.com...
> PJ6 wrote:
> I'd simply change the textbox to a "multiple line" textbox also known
> as the textarea in HTML forms. You can have a textarea in same height
> as a textbox so the design doesn't get crushed by it. The textarea
> supports the tab character and you're done :)
> -Kevin
>
the <textarea> doesn't support tab entry (other than a paste). you can use
client script to do it though, through the onkeydown event. if the key is a
tab, insert the tab char into the current postion..
-- bruce (sqlwork.com)
"PJ6" <nobody@.nowhere.net> wrote in message
news:O1Gp%234p%23FHA.2452@.TK2MSFTNGP11.phx.gbl...
> What's the best way to prevent the tab key from shifting focus away from a
> textbox, but rather insert the tab character? Do I just do it the obvious
> way with JavaScript or is there some simple property to set?
> Paul
>
Yeah, that's what I thought I had to do :-/
Thanks,
Paul
"Bruce Barker" <brubar_nospamplease_@.safeco.com> wrote in message
news:OcREbjq%23FHA.4092@.TK2MSFTNGP10.phx.gbl...
> the <textarea> doesn't support tab entry (other than a paste). you can use
> client script to do it though, through the onkeydown event. if the key is
> a tab, insert the tab char into the current postion..
> -- bruce (sqlwork.com)
>
> "PJ6" <nobody@.nowhere.net> wrote in message
> news:O1Gp%234p%23FHA.2452@.TK2MSFTNGP11.phx.gbl...
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment