Form Serialization Question

Form Serialization Question


Maybe I miss here with jQuery, but when it comes to forms, if you want
to XHR the form elements, you need to serialize the elements of the
form yourself.
If so, when it comes to checkboxes, per HTML standard, it should not
serialize unchecked fields.
I see in jQuery.param, one change to it to skip unchecked check boxes
with make it HTML compliant:
    // If an array was passed in, assume that it is an array
    // of form elements
    if ( a.constructor == Array || a.jquery )
        // Serialize the form elements
        jQuery.each( a, function(){
// do not add unchecked checboxes
if ((this.type != "checkbox") ||
this.checked)
         s.push( encodeURIComponent(this.name) + "=" +
encodeURIComponent( this.value ) );
        });
Since the assumption is "form elements", then it has to compliant to
the expected HTML FORM serialization logic thus checking for unchecked
states.
Comments?
---
HLS