select box posting to jquery ajax appends [] to the field name -
i have select box on page post jquery using .ajax , works great when select box can select 1 value, when change "multiple" appends [] end of field name. example listid without multiple fine, "multiple" attribute changes name listid[]. idea what's happening?
<select multiple size="5" name="frmrecipientlist" id="listid"> $.ajax({ url: '/app/components/mailingsreport.cfc', //post method used type: "post", complete: function(){ $("#loader").hide(); }, //pass data data: { method: "createemailing", title: $('#title').val(), campaignid: $('#campaignid').val(), brandid: $('#brandid').val(), listid: $('#listid').val(), maxrecipients: $('#maxrecipients').val(), subject: $('#subject').val(), fromname: $('#viewfrom').val(), testtoemail: $('#testtoemail').val(), htmlcode: $('#htmlcode').val() }, datatype: "html",
listid
<select multiple>
. means there can multiple values. []
makes array, on server, can read values.
Comments
Post a Comment