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

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 1.0.1
    • 1.3.10, 1.4.0
    • Tag Libraries
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: