XML validation error in IE for css_xhtml theme
----------------------------------------------
Key: WW-3428
URL: https://issues.apache.org/jira/browse/WW-3428
Project: Struts 2
Issue Type: Bug
Components: XML Validators
Affects Versions: 2.1.8.1
Environment: Internet Explorer
Reporter: Ramkumar
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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.