RE: [PHP] Setting focus on a textfield
| From: | Ford, Mike [LSS] | Date: | Fri, 27 Jun 2003 14:35:34 +0000 |
| Subject: | RE: [PHP] Setting focus on a textfield | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-153147@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Marek Kilimajer
A little corection
Ernest E Vogelsinger wrote:
> At 09:42 20.03.2003, Angelo Zanetti said:
> --------------------[snip]--------------------
>
>>Hi guys how do I set the cursor to start in a particular textfield
(password
>>field) when my php page starts?
>>
>>TIA
>
> --------------------[snip]--------------------
>
> This is done with a JavaScript "OnLoad" handler:
>
> <body onload="forms[myform].elements[pass].focus();">
<body onload="forms['myform'].elements['pass'].focus();">
<body onload="document.myform.pass.focus();">
should also work -- as should
<body onload="document['myform']['pass'].focus()">