You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gi...@smals-mvm.be on 2002/10/04 16:38:00 UTC
html:form focus causes a javascript error if the element is a radio
button
Hi there funny crew,
did someone allready noticed that Struts's html:form tag generate this
kind of javascript:...
document.forms["AnyFormName"].elements["anyFieldName"].focus()
...to give the focus to the element 'anyFieldName' of the form , and that
it causes a javascript error if the element is a radio button.
My JSP is generated and I cannot guess whish type of element will be first
focussed.
I guess that the tag have to generate this:
document.forms["AnyFormName"].elements["anyFieldName"][0].focus()
in the case of radio button input element.
Is it a bug or am I wrong? Will I have to set the focus in a scriptlet?
Gilles Vandaele
0498 52 64 12
gilles.vandaele@advalvas.beGilles Vandaele
0498 52 64 12
gilles.vandaele@advalvas.be
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: html:form focus causes a javascript error if the element is a
radio button
Posted by Eddie Bush <ek...@swbell.net>.
Ask Bugzilla :-) http://issues.apache.org/bugzilla
Gilles.Vandaele@smals-mvm.be wrote:
>Hi there funny crew,
>
>did someone allready noticed that Struts's html:form tag generate this
>kind of javascript:...
>
> document.forms["AnyFormName"].elements["anyFieldName"].focus()
>
>...to give the focus to the element 'anyFieldName' of the form , and that
>it causes a javascript error if the element is a radio button.
>
>My JSP is generated and I cannot guess whish type of element will be first
>focussed.
>
>I guess that the tag have to generate this:
>document.forms["AnyFormName"].elements["anyFieldName"][0].focus()
>in the case of radio button input element.
>
>Is it a bug or am I wrong? Will I have to set the focus in a scriptlet?
>
>
>
>Gilles Vandaele
>0498 52 64 12
>gilles.vandaele@advalvas.beGilles Vandaele
>0498 52 64 12
>gilles.vandaele@advalvas.be
>
--
Eddie Bush
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>