Opened 14 years ago
Closed 13 years ago
#4874 closed bug (worksforme)
serializeArray ignores input[type=image|submit]
Reported by: | furf | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | serializeArray | Cc: | |
Blocked by: | Blocking: |
Description
This code looks like it's purposefully ignoring type="submit|image". Is this a bug or a feature?
.filter(function(){
return this.name && !this.disabled &&
(this.checked /select|textarea/i.test(this.nodeName) /text|hidden|password|search/i.test(this.type));
})
I often use a value on my submits to determine which action has been called.
Note: See
TracTickets for help on using
tickets.
When you call .serializeArray(), there is no button that was pressed. Even if that loop filtered buttons it would have to throw them out since only a pressed button is "successful" and submitted with the form.