Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-158

The <html:form> tag generates incorrect focus javascript for radio buttons.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Build
    • Fix Version/s: 1.0.0
    • Component/s: Tag Libraries
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • Bugzilla Id:
      1586

      Description

      The <html:form> tag generates incorrect focus javascript for radio buttons.

      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>

        Attachments

          Activity

            People

            • Assignee:
              craigmcc Craig R. McClanahan
              Reporter:
              wyoung@metasolv.com Wayne
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: