Update of /var/cvs/html/mmbase/validation In directory james.mmbase.org:/tmp/cvs-serv767
Modified Files: validation.js.jsp Log Message: if no elements at all, also call the validateHook See also: http://cvs.mmbase.org/viewcvs/html/mmbase/validation Index: validation.js.jsp =================================================================== RCS file: /var/cvs/html/mmbase/validation/validation.js.jsp,v retrieving revision 1.42 retrieving revision 1.43 diff -u -b -r1.42 -r1.43 --- validation.js.jsp 21 Dec 2007 13:45:04 -0000 1.42 +++ validation.js.jsp 20 Mar 2008 14:00:38 -0000 1.43 @@ -10,7 +10,7 @@ * then call validator.setup(window[,root]). * * @author Michiel Meeuwissen - * @version $Id: validation.js.jsp,v 1.42 2007/12/21 13:45:04 michiel Exp $ + * @version $Id: validation.js.jsp,v 1.43 2008/03/20 14:00:38 michiel Exp $ */ var validators = new Array(); @@ -726,7 +726,7 @@ if (el == null) { el = document.documentElement; } - this.log("Will validate " + el); + this.log("Will validate elements in " + el + " (" + els.length + " elements)"); var els = getElementsByClass(el, "mm_validate"); for (var i = 0; i < els.length; i++) { @@ -772,6 +772,11 @@ } } + if (els.length == 0) { + if (this.validateHook) { + this.validateHook(this.invalidElements == 0); + } + } el = null; } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs