| George Pitcher 2005-03-30, 3:57 pm |
| Hi,
The following will do it for you:
<script language="JavaScript">
<!-- Begin
function toForm() {
document.form1.username.focus();
}
</script>
Replace 'username' in the script with the field name of which you want to
place the focus. Also, give the form a name: <form name="form1" ...>
Cheers
George
> -----Original Message-----
> From: l Burnerheimerton [mailto:lburnerheimerton@yahoo.com]
> Sent: 30 March 2005 3:53 pm
> To: pear-general@lists.php.net
> Subject: [PEAR] how to make (using javascript or otherwise) cursor go to
> username field in AUTH when page loads?
>
>
> I am using AUTH and like it. I want to make it so
> that when the page loads, the cursor is in the first
> field. Now you have to click in that field.
>
> Thanks.
>
> function loginFunction()
> {
> ...
> echo "<input type=\"text\" name=\"logName\"><BR>";
> echo "<input type=\"pass\" name=\"pass\"><BR>";
> ...
> }
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
|