I want to change the form action based on a selection value.
<form name="store" id="store" method="post" action=""> <select name="storeID"> <option value="/stores/store6.php">6</option> <option value="/stores/store10.php">10</option> </select> </form>
Now I want the form action, to use the select option value. For example:
If Selection 1 is selected, use the folowing form action /stores/store6.php
You can use the
onchangeevent to change the form's action
Here is a jsfiddle with the code.