easy one guys:
i have a select, type multiple, so i need to do a loop to send to database each value that was selected, one by one.
this is what i have done so far, but my $.each are returning 0 1 2 3.
how can i do this ?
html:
<select multiple="multiple" id="sel">
<option>All</option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
js:
$("#send").click(function(){
var sel = $("#sel").val();
$.each(sel, function(e){
alert(e); // should come the text of each one
});
});
Thanks.
You show the
keynot thevalue. try this