PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_AJAX » Bug #7032

submitForm does not handle checkbox in the right way

Details

Submitted2006-03-06 13:12 UTC
Fromiljamaas at dreamsolution dot nl
Assignedjeichorn
StatusClosed
PackageHTML_AJAX
PHP Version4.3.2
OSWindows 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