Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.1.8.1
-
Internet Explorer
-
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