How can I get the values selected in the drop-down list, using a JavaScript function? User can select multiple values from both the elements. Following are the elements
var fld = document.getElementById('icOptions');
var values = [];
for (var i = 0; i < fld.options.length; i++) {
if (fld.options[i].selected) {
values.push(fld.options[i].value);
}
}
// do something with values