Reputation: 1838
I create a list like this
<select multiple="multiple" style="width: 120px;" id="list" name="keywordlist" size="0">
</select>
and I add item to this by jquery and every thing work ok until I submit it to the server(PHP) the post variable contain only the last <option></option>
I clicked on I want to get all the list from the server side.
this the jquery:
$("#list").append("<option value='"+$("#keyword").val()+"' selected='true'>"+$("#keyword").val()+"</option>");
var i= $("#list").attr("size");
i=parseInt(i);
i++;
$("#list").attr("size",i);
Upvotes: 0
Views: 376