I want to fill an array in javascript that takes all the values out of different selectboxes with the same name
so for example if i have a html like this:
<select name="selectbox[]">
<option value="value1">text1</option>
<option value="value2">text2</option>
</select>
<select name="selectbox[]">
<option value="value1">text1</option>
<option value="value2">text2</option>
</select>
I have to get the selected values of both selectboxes and put it in an array.
what i did:
$("input[name=selectbox\\[\\]]").map(function(){return $(this).val();});
does not work.
A similar example wich does work for textboxes:
$("input[name=textbox\\[\\]]").map(function(){return this.value;});
Thanks for your help!