mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
Resolved WW-3295 - display of Ajax-Validation-Errors may fail on Internet Explore
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@927727 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -100,7 +100,11 @@ function addErrorCSS(e, errorText) {
|
||||
errorDiv.setAttribute("className", "errorMessage");//ie hack cause ie does not support setAttribute
|
||||
errorDiv.setAttribute("errorFor", elem.id);
|
||||
errorDiv.appendChild(error);
|
||||
enclosingDiv.insertBefore(errorDiv, firstCtrNode);
|
||||
if(!firstCtrNode && navigator.appName == 'Microsoft Internet Explorer') {
|
||||
enclosingDiv.insertBefore(errorDiv);
|
||||
} else {
|
||||
enclosingDiv.insertBefore(errorDiv, firstCtrNode);
|
||||
}
|
||||
} catch (err) {
|
||||
alert("An exception occurred: " + err.name + ". Error message: " + err.message);
|
||||
}
|
||||
@@ -153,4 +157,4 @@ StrutsUtils.showValidationErrors = function(form, errors) {
|
||||
if (firstFieldErrorPosition != null && form.elements[firstFieldErrorPosition].focus) {
|
||||
form.elements[firstFieldErrorPosition].focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user