Update of /var/cvs/html/mmbase/validation
In directory james.mmbase.org:/tmp/cvs-serv20614

Modified Files:
      Tag: MMBase-1_8
        validation.js.jsp 
Log Message:
cache 404 too, avoid NPE


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.11.2.29
retrieving revision 1.11.2.30
diff -u -b -r1.11.2.29 -r1.11.2.30
--- validation.js.jsp   11 Nov 2008 16:06:36 -0000      1.11.2.29
+++ validation.js.jsp   3 Mar 2009 15:33:03 -0000       1.11.2.30
@@ -9,7 +9,7 @@
  *                              then call validator.setup(el).
  *
  * @author Michiel Meeuwissen
- * @version $Id: validation.js.jsp,v 1.11.2.29 2008/11/11 16:06:36 michiel Exp 
$
+ * @version $Id: validation.js.jsp,v 1.11.2.30 2009/03/03 15:33:03 michiel Exp 
$
  */
 
 
@@ -156,7 +156,7 @@
 
     var tagName = path.shift();
 
-    var tag = el.firstChild;
+    var tag = el == null ? null : el.firstChild;
     while (tag != null) {
        if (tag.nodeType == 1) {
            var name = tag.nodeName.replace(/^.*:/,'');
@@ -459,7 +459,7 @@
            $.ajax({async: false, url: url, type: "GET",
                 dataType: "xml", data: params,
                        complete: function(res, status){
-                           if (status == "success") {
+                           if (status == "success" || res.status == '404') {
                                    dataType = res.responseXML;
                                    self.dataTypeCache[el.mm_key] = dataType;
                            }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to