Update of /var/cvs/html/mmbase/validation
In directory james.mmbase.org:/tmp/cvs-serv8949
Modified Files:
validation.js.jsp
Log Message:
work if 'window' was specified as root
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.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- validation.js.jsp 12 Aug 2008 19:41:31 -0000 1.53
+++ validation.js.jsp 12 Aug 2008 19:46:14 -0000 1.54
@@ -9,7 +9,7 @@
* then call validator.setup(el).
*
* @author Michiel Meeuwissen
- * @version $Id: validation.js.jsp,v 1.53 2008/08/12 19:41:31 michiel Exp $
+ * @version $Id: validation.js.jsp,v 1.54 2008/08/12 19:46:14 michiel Exp $
*/
@@ -62,7 +62,10 @@
MMBaseValidator.prototype.setup = function(el) {
- if (el != null) this.root = el;
+ if (el != null) {
+ this.root = el;
+ if (this.root == window) this.root = this.root.document;
+ }
if (this.root != null) {
var self = this;
$(document).ready(function(event) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs