Opened 14 years ago

Closed 14 years ago

#4330 closed defect (fixed)

xhrGet not working with select multiple in a form

Reported by: James Burke Owned by: James Burke
Priority: high Milestone: 1.0
Component: General Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


Passing a form to xhrGet that has a select with the multiple attribute does not send a value for that element.

Some discussion here:

Change History (4)

comment:1 Changed 14 years ago by guest

The problem is with the

dojo.query("option[selected]", item).forEach(function(opt){

the dojo.query option[selected] is not returning anything. If this is changed to

dojo.query("option", item).forEach(function(opt){
    if (option.selected) {

then everything works as expected.

comment:2 Changed 14 years ago by James Burke

Owner: changed from James Burke to alex

Alex, does dojo.query need to be fixed, or should I just detect option.selected in the forEach? Assign it back to me if I should just change the forEach logic.

comment:3 Changed 14 years ago by James Burke

Owner: changed from alex to James Burke

I think the problem is if the selects are set via javascript, then the DOM may not have selected attribute, and the query would fail. I'm doing other formToObject changes so I'll take this one.

comment:4 Changed 14 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [10458]) Fixes #4259 and #4330. Fixes for form values with multiple names and for selects with multiple selected options

Note: See TracTickets for help on using tickets.