Skip Menu |

This queue is for tickets about the CGI-Ajax CPAN distribution.

Report information
The Basics
Id: 37863
Status: new
Priority: 0/
Queue: CGI-Ajax

People
Owner: Nobody in particular
Requestors: andrew [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.701
Fixed in: (no value)



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') {