Question: I want to set alert when the value is same. And the value selected is back to previous value
Here is my HTML:

```js
$("#to").val("BGK");
 var fromCity = "";
 var toCity = "";
   $('#from,#to').change(function(){
     var fromCityVal = $("#from").val();
     var toCityVal = $("#to").val();
       if (fromCityVal == toCityVal){
         alert("city of origin may not be the same as the destination city!");
         } 
         else {
           //here's problem, what should I do?
          $("#from").val();
         }
});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<select name="" id="from">
  <option value="DPS">Denpasar</option>
  <option value="BGK">Bangkok</option>
  <option value="MOS">Moscow</option>
</select>

<select name="" id="to">
  <option value="DPS">Denpasar</option>
  <option value="BGK">Bangkok</option>
  <option value="MOS">Moscow</option>
</select>
```

I try this, but not success, What should I do? or any suggestion? Thank you
Here's my code in jsfiddle: <https://jsfiddle.net/dedi_wibisono17/hx1voew9/>

Answer: 
At page load , fetch your current selection values in a variable, and map the selection box with this value after alert.
Please find the working fiddle as expected - [Fiddle](https://jsfiddle.net/dedi_wibisono17/hx1voew9/)

```
$('#from,#to').change(function() {
  var fromCityVal = $("#from").val();
  var toCityVal = $("#to").val();
  if (fromCityVal == toCityVal) {
    alert("city of origin may not be the same as the destination city!");
    $("#from").val("DPS");
    $("#to").val("BGK");
  }
});

```