//Gets the selected values
var selected = [];
for (var option of document.getElementById('mySelect').options) {
if (option.selected) {
selected.push(option.value);
}
}
//Resets the form
document.getElementById('form1').reset();
//Chosen values doesnt get reset, so we do this manually
//Removes the values selected by clicking on the x icon
$link = $('a.search-choice-close');
var i;
for (i = 0; i < selected.length; i++) {
$link[i].click();
}