I am trying to set focus to a radio button using the <html:form> "focus"
attribute, but the javascript generated doesn't work. I'm not sure if I'm
not using the "focus" attribute on <html:form> incorrectly, or if this is a
bug.
Here's a snippet of the JSP: (some formatting removed)
<html:form action="/postProductCategory" focus="productCategory[0]">
<html:radio property="productCategory"
value="network">Network</html:radio>
<html:radio property="productCategory"
value="connection">Connection</html:radio>
<html:submit property="next">Next</html:submit>
</html:form>
It generates javascript like: (BAD)
<script language="JavaScript" type="text/javascript">
<!--
document.forms["formProductCategory"].elements["productCategory[0]"].focus()
// -->
</script>
The CORRECT javascript is: (GOOD)
<script language="JavaScript" type="text/javascript">
<!--
document.forms["formProductCategory"].elements["productCategory"][0].focus()
// -->
</script>
Any help would be appreciated. Thanks.
Wayne
[EMAIL PROTECTED]