Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple:false and IE7 #31

Closed
mpjura opened this issue Oct 23, 2010 · 3 comments
Closed

multiple:false and IE7 #31

mpjura opened this issue Oct 23, 2010 · 3 comments

Comments

@mpjura
Copy link

mpjura commented Oct 23, 2010

Setting multiple:false to create a list of radio buttons was rendering the radio buttons unselectable in IE7. Adding a name attribute to the inputs seemed to work.

I changed:

"type="'+(o.multiple ? "checkbox" : "radio")

to:

"type="'+(o.multiple ? "checkbox" : "radio" name="multiselect-radios")

@ehynds
Copy link
Owner

ehynds commented Oct 23, 2010

Thanks, I will check it out. I cannot add the name attribute because otherwise the values will be submitted twice. Once for the radio/checkbook, and once for the original underlying select. Only the values from the original select should be submitted; multiselect is really just a new interface to select them.

@mpjura
Copy link
Author

mpjura commented Oct 23, 2010

Right, I didn't even think of that. I'm catching the form submit, scraping the values with getChecked and sending it off in an ajax request so I didn't run into it.

I'll look into another solution and post if I find anything.

@ehynds
Copy link
Owner

ehynds commented Oct 25, 2010

OK, I landed a fix for all single select and associated IE problems: 7a6258a

As it turns out, IE6/7 require the name attr for inputs to work correctly, so as much as I didn't want to include it, there's no other work around without bloating the code base severely.

Users just need to be aware that the values will come through from the original select box under the original select box's name, as well as a name generated by multiselect. So if you have a select control with the name and id "foo", and you select the "bar" option, serialization will look like this:

foo=bar&multiselect_foo=bar

This goes for single selects and multiple selects. If folks really dislike this then they can setup a submit handler that'll remove the name attr from all the inputs so they won't be transmitted. Seems like a good compromise to receive full IE compatibility.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants