I have a a select box that is a list of cities and I want to filter by the state where the city is located.
Here is a sample:
<select title="Select City..." id="city-list" name="city-list" class="city-list" multiple="multiple">
<option value="TX|75001">Addison (Dallas)</option>
I want to filter them (not show the items not in the state selected) by the state, which is the first 2 chars of the value. The state will be selected in another select and the select function will need to filter the options in the city by that state value.
I also need to know how to take out the state and '|' when selecting a value from the city list. I am appending the zip codes to an array as they are selected.