You can use the onchange
event to change the form’s action
document.getElementById('store').storeID.onchange = function() {
var newaction = this.value;
document.getElementById('store').action = newaction;
};
Here is a jsfiddle with the code.