mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
see mailinglist
This commit is contained in:
parent
d7856eb24b
commit
5ee555c9f0
16
ajax/ajax.js
16
ajax/ajax.js
@ -146,11 +146,11 @@ $.fn.formValues = function(sButton) {
|
||||
// Loop the shite
|
||||
$('*', this).each(function() {
|
||||
// Skip elements not of the types in elp
|
||||
if (!elp[this.tagName])
|
||||
if (!elp[this.tagName.toUpperCase()])
|
||||
return;
|
||||
|
||||
// Skip disabled elements
|
||||
if (this.disabled)
|
||||
// Skip disabled elements, submit buttons and image buttons
|
||||
if ((this.disabled) || (this.type == 'submit') || (this.type == 'image'))
|
||||
return;
|
||||
|
||||
// Skip non-selected nodes
|
||||
@ -169,9 +169,15 @@ $.fn.formValues = function(sButton) {
|
||||
});
|
||||
|
||||
// Add submit button if needed
|
||||
if (sButton && (sButton !== null))
|
||||
a.push({ name: sButton, value: 'x' });
|
||||
if (sButton && (sButton !== null)) {
|
||||
var el = $(sButton).get(0);
|
||||
a.push({
|
||||
name: el.name || el.id || el.parentNode.name || el.parentNode.id,
|
||||
value: el.value
|
||||
});
|
||||
}
|
||||
|
||||
// Done
|
||||
return a;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user