1. opensymphony
  2. webwork

Commits

tm_jee  committed 9cb45c3

WW-1486 Unexpected behavior in Firefox with <ww:hidden> tag and ajax validation

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2963573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 88641d9
  • Branches master

Comments (0)

Files changed (1)

File src/java/template/xhtml/validation.js

View file
  • Ignore whitespace
 } 
  
 function clearErrorMessages(form) {
-    var table = form.childNodes[1];
-    if( typeof table == "undefined" ) {
-        table = form.childNodes[0];
+
+    var table = null;
+    for (var z=0; z<form.childNodes.length; z++) {
+        if ("TABLE" == form.childNodes[z].nodeName) {
+            table = form.childNodes[z];
+            break;
+        }
     }
 
     // clear out any rows with an "errorFor" attribute