I'm trying to launch a command based on a select dropdown value. If the value is Alabama or Alaska then the page should re-direct to another webpage. If the value is California then the page is unchanged.
I don't want to check the value onchange, rather it should be when the user clicks on the button after the dropdown.
Here's the jsfiddle for reference: https://jsfiddle.net/41qpawr8/1/
I think this can be done in Javascript or JQuery but I don't them well enough to proceed. Thanks in advance :)
<select class="select-state" name="state" id="administrative_area_level_1">
<option value="">-</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="CA">California</option>
</select>
<button id="check">
Check
</button>