I have the code below that will change a state dropdown list when you change the country list.
How can I make it change the state list ONLY when country ID number 234 an
EDIT: here is a solution that works quite well for the task, adapting the lines of Tvanfosson:
As you can see, I eliminated the element which is not absolutely necessary but can be added (and then has to be used properly in case JS is deactivated at the users end. See
here.
I also eliminated the onchange
event which is being replaced by the 'change()` jquery function.