.serialize() event parameter
The serialize() function uses a concept called "successful controls" to determine while fields will be passed into the serialized string. One of the details of "successful controls" is that it doesn't include submit buttons, because:
"No submit button value is serialized since the form was not submitted using a button"
When I use serialize(), more often than not the form is submitted with a submit button. I typically use the recommended method, which gets triggered automatically when a submit button is pressed:
$('form').submit(function() {
alert($(this).serialize());
return false;
});
I'm proposing that .serialize() adds an optional event parameter, so we can see which submit button was pushed if we need to, IE:
$('form').submit(function(e) {
alert($(this).serialize(e));
return false;
});
Just a thought