I've been trying to get the values in a multiple select box and put it in an array. I've tried this:
JQUERY
var selectedValues = $('#multipleSelect').val();
HTML
<select id="multipleSelect" multiple="multiple">
<option value="1">Text 1</option>
<option value="2">Text 2</option>
<option value="3">Text 3</option>
</select>
By Darin Dimitrov from this SO question.
I was wondering if there was a way to get all the values in the multiple select box without having to select anything.