There's already a question with a ton of votes for getting the selected value from a dropdown using jQuery here.
That answer almost works for a listbox, but if multiple values are selected, the result is a single string with all the values concatenated. This is not useful. I need a collection (list, array, whatever) of the text values for each selected option.
At the moment I'm thinking I'll use most of the answer from that other question, but without the .text()
at the end, and then iterate through the matches. Better ideas?