Under Netscape 4.7 for Windows, the html:form focus feature doesn't work properly. Is there a work around?

Ted Husted

The problem is that the focus feature works all right at first, but when you press tab, it proceeds to the address bar, rather than the next field. After you tab around once, it starts working as expected. One work around is to use the "onblur" event on the initial field to select the second. After that, Bob's your uncle!


<html:form action="/logon" focus="username">
<p>Username <html:text property="username"
<p>Password <html:password property="password"/>
<p><html:submit property="submit" value="SIGN IN" />

To focus the first field on the first form, you can also do this 

<body  onload="document.forms[0].elements[0].focus();">

in all your form pages rather than use the Struts html:form focus property.