Commit 5ee555c9 authored by Gilles van den Hoven's avatar Gilles van den Hoven

see mailinglist

parent d7856eb2
...@@ -146,11 +146,11 @@ $.fn.formValues = function(sButton) { ...@@ -146,11 +146,11 @@ $.fn.formValues = function(sButton) {
// Loop the shite // Loop the shite
$('*', this).each(function() { $('*', this).each(function() {
// Skip elements not of the types in elp // Skip elements not of the types in elp
if (!elp[this.tagName]) if (!elp[this.tagName.toUpperCase()])
return; return;
// Skip disabled elements // Skip disabled elements, submit buttons and image buttons
if (this.disabled) if ((this.disabled) || (this.type == 'submit') || (this.type == 'image'))
return; return;
// Skip non-selected nodes // Skip non-selected nodes
...@@ -169,9 +169,15 @@ $.fn.formValues = function(sButton) { ...@@ -169,9 +169,15 @@ $.fn.formValues = function(sButton) {
}); });
// Add submit button if needed // Add submit button if needed
if (sButton && (sButton !== null)) if (sButton && (sButton !== null)) {
a.push({ name: sButton, value: 'x' }); var el = $(sButton).get(0);
a.push({
name: el.name || el.id || el.parentNode.name || el.parentNode.id,
value: el.value
});
}
// Done
return a; return a;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment