Yes/No confirmation message
<p>I'm trying to get an alert message with Yes/No option, where clicking on 'Yes' reloads a another drop-down option, and 'No' would revert back to the previous selection. Here is what I'm trying to say (obviously doesn't work):</p>

<pre><code>&lt;select size="1" name="m" id="m"&gt;  
    &lt;option selected value="1"&gt;apple&lt;/option&gt;
    &lt;option value="2"&gt;ball&lt;/option&gt;
    &lt;option value="3"&gt;cat&lt;/option&gt;
    &lt;option value="4"&gt;dog&lt;/option&gt;
    &lt;option value="5"&gt;egg&lt;/option&gt;
&lt;/select&gt;

$('#m').change(function() {
    var answer = confirm("this will change your selection.");
    if (answer) { // ie, if i click 'OK'
        location.reload(); // reload the &lt;select&gt; option below to "selected"
    } else {
        break; // revert back to the previous selection
    }
});


&lt;select size="1" name="a" id="a"&gt;  
    &lt;option selected value="1"&gt;aaa&lt;/option&gt;
    &lt;option value="2"&gt;bbb&lt;/option&gt;
    &lt;option value="3"&gt;ccc&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Many thanks in advance. Feel free to <a href="http://jsfiddle.net/exZHN/" rel="nofollow">click</a>, and edit.</p>
