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

Generated javascript is wrong to set focus on control that is of array

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.3.10, 1.4.0
    • Component/s: Tag Libraries
    • Labels:
      None
    • Environment:
      All

      Description

      I have a form with radio buttons on it. focus control is set to radio property and focus index is set to 0.

      Generated javascript is below. As in this case focus control is array on input objects (radios), sty┼če check yields to a javascript error...

      </form>
      <script type="text/javascript" language="JavaScript">
      <!--
      var focusControl = document.forms["accountForm3"].elements["active"];

      if (focusControl.type != "hidden" && !focusControl.disabled && focusControl.style.display != "none") {
      focusControl[0].focus();
      }
      // -->
      </script>

        Attachments

        1. struts_patch.txt
          2 kB
          Hasan Ceylan

          Issue Links

            Activity

              People

              • Assignee:
                pbenedict Paul Benedict
                Reporter:
                hceylan@batoo.org Hasan Ceylan
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: