for the below drop down list, when i select any value, I have to do a confirm (OK/Cancel), if user selects Cancel, I need to retain the previous state. What's happening is when hitting on Cancel and doing `return false;`, the new value is getting selected, and not retaining the previous value. How can i make sure the previous value is selected, when cancel is clicked. I tried using the below code but doesn't seem to help:

```
var ele = document.getElementById('mySelect');
ele.selected = ele.defaultSelected;            
return false;

<select id="mySelect" multiple="multiple">
  <option value="1">First</option>
  <option value="2">Second</option>
  <option value="3">Third</option>
  <option value="4">Fourth</option>
</select>

```