[thelist] Simple HTML form question

.jeff jeff at members.evolt.org
Mon Mar 3 17:51:01 CST 2003


> From: Chris W. Parker
> 1. i go to http://www.wamu.com/
> 2. click in the username field
> 3. start typing
> 4. tab into the password field
> 5. get halfway done with my password by the time the
>    page fully loads and executes the onload event
> 6. cursor goes back to the username field and i write
>    the latter half of my password in front of my
>    username

there's a very simple solution to all of this.  instead of using the onload
event handler, just put your script to focus the form field in the body
right after the html for the form.

<form name="myForm">
<input type="text" name="username" />
<script language="JavaScript" type="text/javascript">
// -->


jeff at members.evolt.org

More information about the thelist mailing list