Re: <textarea> & tabs
| From: | David Robley | Date: | Tue, 08 Aug 2000 04:18:49 +0000 |
| Subject: | Re: <textarea> & tabs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10586@lists.php.net to get a copy of this message | ||
On 8 Aug, Christian wrote:
> Hi all,
>
> I have a form that contains some text area inputs ..
> eg.
>
> <textarea rows="2" name="AA" cols="35"></textarea>
> <input type="text" name="BB" size="21">
> <textarea rows="2" name="CC" cols="35"></textarea>
>
> I have found that when the user types in
> a word into the AA field followed by a tab
> the content of BB get pushed to CC leaving BB blank :-/
>
> eg.
>
> enter: Apple{\t tab} Banana Orange
>
> $HTTP_POST_VARS[AA] -> 'Apple'
> $HTTP_POST_VARS[BB] -> ''
> $HTTP_POST_VARS[CC] -> 'Banana'
>
> enter with out the tab
>
> $HTTP_POST_VARS[AA] -> 'Apple'
> $HTTP_POST_VARS[BB] -> 'Banana'
> $HTTP_POST_VARS[CC] -> 'Orange'
>
>
> Why is this so ?
> Is it a PHP or GGI thing ?
> And of course what's the easiest way to overcome this ?
>
> Thanks heaps,
> Christian
This is a 'window manager' thing :-) In general, the tab key is used to
move focus between entry points (text boxes, buttons etc); the keystroke
is intercepted and acted on by the window manager and never gets to the
form. So if you were in textarea aa and enter something, it shows up in
aa. Then you click into the textbox bb and press <TAB> and you'll see
the focus shift to cc.
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA