How can I send multiple values (ie., values from multiple drop down) as a string separated by commas, using JavaScript while submitting a form.
I have a set of values which has to be selected based on the drop down selection, like if the value is 1 I have to send 5609, if the value is 2, 5610. I have arrays for this data.
If we select values 1 and 2 then the string that has to be created is 5609,5610
<select multiple id="value">
<option value="1">Car</option>
<option value="2">Bus</option>
<option value="3">Bike</option>
<option value="4">Van</option>
</select>