Home » HTML » HTML_AJAX » Bug #7032
submitForm does not handle checkbox in the right way
Details
| Submitted | 2006-03-06 13:12 UTC |
|---|---|
| From | iljamaas at dreamsolution dot nl |
| Assigned | jeichorn |
| Status | Closed |
| Package | HTML_AJAX |
| PHP Version | 4.3.2 |
| OS | Windows 2000 |
| Roadmaps | (Not assigned) |
Comments
[2006-03-06 13:12 UTC] iljamaas at dreamsolution dot nl
Description:
------------
// SNIP //
case 'input':
var inpType = el.getAttribute('type');
switch (inpType) {
case 'submit':
type = 'button';
break;
case 'checkbox':
case 'radio':
if (el.checked) {
value = 'checked';
break;
}
// unchecked radios/checkboxes don't get submitted
continue childLoop;
case 'text':
default:
type = 'text';
// continue for value
break;
}
break;
// SNIP //
A checkbox should return its value not 'checked'
** FIX **
if (el.checked) {
value = el.value;
break;
}
[2006-03-06 15:41 UTC] jeichorn at php dot net
Fixed in svn, you can get the new version from
http://svn.bluga.net/HTML_AJAX/trunk/js