Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-18

[validator] Validation in MSIE5.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 38159

    Description

      Version : commons-validator-1.2.0

      The validation in MSIE5.0 failed with errors like :

      A Runtime error has occurred.
      Do you wish to Debug ?
      Line: 1361
      Error: Expected ';'

      To solve this error I have changed the method retrieveFormName in
      validateUtilities.js from :

      function retrieveFormName(form) {
      // Please refer to Bugs 31534, 35127, 35294 & 37315
      // for the history of the following code
      if (form.getAttributeNode) {
      if (form.getAttributeNode("id") && form.getAttributeNode("id").value)

      { return form.getAttributeNode("id").value; }

      else

      { return form.getAttributeNode("name").value; }

      } else if (form.getAttribute) {
      if (form.getAttribute("id"))

      { return form.getAttribute("id"); }

      else

      { form.attributes["name"]; }

      } else {
      if (form.id)

      { return form.id; }

      else

      { return form.name; }

      }
      }

      to

      function retrieveFormName(form) {
      var x;
      if (form.getAttributeNode) {
      if (form.getAttributeNode("id") && form.getAttributeNode("id").value)

      { x = form.getAttributeNode("id").value; }

      else

      { x = form.getAttributeNode("name").value; }

      } else if (form.getAttribute) {
      if (form.getAttribute("name"))

      { x = form.getAttribute("name"); }

      else

      { x = form.getAttribute("id"); }

      } else {
      if (form.id)

      { x = form.id; }

      else

      { x = form.name; }

      }
      return x;
      }

      This solution is tested on :
      FireFox 1.5
      MSIE 5.00.3502.1000
      MSIE 6.0.2900.xpsp_sp2_gdr.050301-1519
      Netscape 8.0.4

      Regrads

      Kristian L. Petesen

      Attachments

        Activity

          People

            Unassigned Unassigned
            crap@linddata.dk Kristian L. Petersen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: