multiple select box jquery and post serialize
I am trying to to send a form via post but my multiple select box isn't being sent. How can I serialize the select box with the rest of the form and send it?
Here is the javascript I am using
$('#form-to-submit')开发者_开发知识库.empty().append($(fieldsetName).clone());
$('#form-to-submit select').val($('.fieldsetwrapper select').val());
var data = $('#form-to-submit').serialize();
$.post(url,{data,function(data,textStatus){
I get all fields but the select in the post data.
The select will only serialize if there are selections made... see
Here is an example with serialization and jsonification http://jsfiddle.net/XW2Cm/1/
精彩评论