Subject: | in the readyState4 function, dt could be undefined |
I was having issues with firefox claiming the dt was undefined. I
tracked it down and just added a check for that. I don't know that this
is the correct fix, but it seems to work. I think it was because I
didn't want to pass in any data, I just wanted to update a div so I did
exported_func( [], ['resultdiv'] );
Subject: | CGI-Ajax_dt_undefined.diff |
diff -ru CGI-Ajax-0.701.orig/lib/CGI/Ajax.pm CGI-Ajax-0.701/lib/CGI/Ajax.pm
--- CGI-Ajax-0.701.orig/lib/CGI/Ajax.pm Tue Jul 22 15:33:38 2008
+++ CGI-Ajax-0.701/lib/CGI/Ajax.pm Tue Jul 22 15:34:25 2008
@@ -916,6 +916,7 @@
rsp = rsp.replace(splitval+splitval+'g',splitval+" "+splitval);
var data = rsp.split(splitval);
dt = this.target;
+ if (dt==undefined) { return true; }
if (dt.constructor != Array) { dt=[dt]; }
if (data.constructor != Array) { data=[data]; }
if (typeof(dt[0])!='function') {