[
https://issues.apache.org/struts/browse/STR-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Benedict updated STR-1089:
-------------------------------
Fix Version/s: (was: Future)
1.4.0
Assignee: Paul Benedict (was: Struts Developers)
> [taglib] html:form focus in pages with several forms
> ----------------------------------------------------
>
> Key: STR-1089
> URL: https://issues.apache.org/struts/browse/STR-1089
> Project: Struts 1
> Issue Type: Improvement
> Components: Taglibs
> Affects Versions: Nightly Build
> Environment: Operating System: other
> Platform: Other
> Reporter: Eric Jain
> Assignee: Paul Benedict
> Priority: Minor
> Fix For: 1.4.0
>
>
> 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)...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.