Update of /var/cvs/html/mmbase/validation In directory james.mmbase.org:/tmp/cvs-serv20550
Modified Files: 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.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- validation.js.jsp 9 Feb 2009 11:42:13 -0000 1.58 +++ validation.js.jsp 3 Mar 2009 15:32:35 -0000 1.59 @@ -9,7 +9,7 @@ * then call validator.setup(el). * * @author Michiel Meeuwissen - * @version $Id: validation.js.jsp,v 1.58 2009/02/09 11:42:13 michiel Exp $ + * @version $Id: validation.js.jsp,v 1.59 2009/03/03 15:32:35 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 Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs