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=13454>.
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=13454

adding focus to the <html:form> tag with two forms of the same name generates a 
javascript error

           Summary: adding focus to the <html:form> tag with two forms of
                    the same name generates a javascript error
           Product: Struts
           Version: 1.1 Beta 2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If you have a JSP with 2 forms of the same name (action) - the javascript 
rendered results in a javascript error.

To solve - change this:

<script language="JavaScript" type="text/javascript">
  <!--
 if (document.forms["uploadFiles"].elements["uploadedFile"].type != "hidden") 
    document.forms["uploadFiles"].elements["uploadedFile"].focus()
  // -->
</script>

To something like:

<script language="JavaScript" type="text/javascript">
  <!--
 if (document.forms[1].elements["uploadedFile"].type != "hidden") 
    document.forms[1].elements["uploadedFile"].focus()
  // -->
</script>

So you'd have to know the number of forms on the page.  Also, the 
language="Javascript" is not needed (it's invalid for XHTML), just the type.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to