Bug Tracker

Modify

Ticket #5079 (closed bug: worksforme)

Opened 4 years ago

Last modified 3 years ago

multiple="multiple" selects with no selections are not serialized using jQuery.serialize

Reported by: sharwood Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

This problem seems to be in the serializeArray method. If no selection is made then it's value is null and ignored.

Change History

comment:1 Changed 4 years ago by dmethvin

What would be the desired behavior for that case? Do you have a standards reference for it?

comment:2 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme
  • Component changed from unfiled to ajax

The spec seems pretty clear that select multiple with no elements selected are not considered successful, and therefore should not be serialized.

 http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.