Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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

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

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

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



Subject: Patch to set checkbox value
Download (untitled) / with headers
text/plain 629b
This patch allows setting a checkbox's state using the result of a server-side function. Note that this uses Javascript's boolean interpretation rules, not Perl's. --- c:\perl\site\lib\CGI\Ajax.pm Tue Dec 11 21:20:04 2007 +++ lib\CGI\Ajax.pm Tue Dec 11 21:20:00 2007 @@ -923,7 +923,9 @@ var div = document.getElementById(dt[i]); if (div.type =='text' || div.type=='textarea' || div.type=='hidden' ) { div.value=data[i]; - } else{ + } else if (div.type =='checkbox') { + div.checked=data[i]; + } else { div.innerHTML = data[i]; } }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.