You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/01/06 17:27:06 UTC
DO NOT REPLY [Bug 15816] New: -
html:form focus in pages with several forms
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15816>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15816
html:form focus in pages with several forms
Summary: html:form focus in pages with several forms
Product: Struts
Version: 1.1 Beta 3
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Custom Tags
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: jain@gmx.net
The JavaScript generated by the 'focus' html:form attribute does not always
work with pages that contain several forms. Consider the following situation:
<html:form action="/search" method="get">
<html:hidden property="query"/>
<html:hidden property="offset" value="${offset}"/>
<html:hidden property="limit"/>
<html:submit value="Next results"/>
</html:form>
...
<html:form action="/search" method="get" focus="query">
<html:text property="query"/>
<html:submit value="New search"/>
</html:form>
The generated JavaScript matches the first form instead of the second.
var focusControl = document.forms["form"].elements["query"];
Also, in this particular case, perhaps because 'query' is a hidden field in the
first form, Internet Explorer 6
says: "Error: 'document.forms.form.elements.query' is null or not an object".
(Note: 'form' is the name of the ActionForm)...
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>