Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3428

XML validation error in IE for css_xhtml theme

    XMLWordPrintableJSON

Details

    • Patch, Important

    Description

      The XML validation throws Javascript error in Internet Explorer for css_xhtml theme. Even in the examples provided by apache, the error occurs.

      The error is - "An exception occurred: Error. Error message: Invalid argument. "

      I tried out to figured out the cause and found out the following

      Part of generated Javascript code for my module is

      field = form.elements['district.name'];
      var error = "Enter only alphabets for district";
      if (continueValidation && field.value != null && !field.value.match("^[a-zA-Z ]*$")) {
      addError(field, error);
      errors = true;
      }

      tried to mock up by putting the same code in a function and calling it in onclick event

      the method "addError()" throws the exception and the reason is "field" variable.

      if field is changed to field[0] , it is working fine in my mock up code.

      The validation works fine in firefox, safari and chrome

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            ramkumar83 Ramkumar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: