开发者

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜