mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
WW-2058 Client side validation in xhtml template and clearErrorMessages not working in firefox with hidden fields
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@566190 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -21,11 +21,19 @@
|
||||
|
||||
function clearErrorMessages(form) {
|
||||
|
||||
var table = form.childNodes[1];
|
||||
if( typeof table == "undefined" ) {
|
||||
table = form.childNodes[0];
|
||||
// get field table
|
||||
var table;
|
||||
for (var i = 0; i < form.childNodes.length; i++) {
|
||||
if (form.childNodes[i].tagName != null && form.childNodes[i].tagName.toLowerCase() == 'table') {
|
||||
table = form.childNodes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (table == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// clear out any rows with an "errorFor" attribute
|
||||
var rows = table.rows;
|
||||
var rowsToDelete = new Array();
|
||||
|
||||
Reference in New Issue
Block a user