Re: How to set focus in a form field
| From: | Andre Dubuc | Date: | Thu, 11 Jul 2002 15:50:18 +0000 |
| Subject: | Re: How to set focus in a form field | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107163@lists.php.net to get a copy of this message | ||
> This is JAVASCRIPT problem because it is on the client end.
Thanks to everyone who responded. I sort of thought it would be a
'Client-side' problem. Oh well, since I'm not prepared to use any javascript,
I guess I'll have to live with it. Sigh . . .
Thanks again,
Andre
>
> -----Original Message-----
> From: Andre Dubuc [mailto:aajdubuc@webhart.net]
> Sent: Thursday, July 11, 2002 11:26 AM
> To: php-general@lists.php.net
> Subject: [PHP] How to set focus in a form field
>
>
> I have an annoying 'glitch' in the forms on my site:
>
> When a page loads, if it has a form on it, I would like the cursor to move
> to the first field, be 'set' - that is, I should see a cursor or blinking
> cursor in the first field.
>
> As it is now, on some pages, I either have to 'tab' to the first field, or
> click themouse in that field.
>
> Is there anyway to automate this, so that when a page loads it
> automatically goes to the first field, and 'highlights' the entry area?
> (Btw, I tried 'tabindex=1' but it still does not do what I'd like it to.
>
> Any ideas, suggestions, or admontions gratefully accepted.
>
> Tia, Andre