Skip to main content

Bug Tracker

Side navigation

#4874 closed bug (worksforme)

Opened July 09, 2009 06:05PM UTC

Closed September 09, 2010 09:36PM UTC

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.

Attachments (0)
Change History (1)

Changed September 09, 2010 09:36PM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

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.