Possible Duplicate:
Use jquery to change second select list based on first select list option
I’ve got two select elements in my code. One for states (#us_state) and second for cities (#city_name). When I choose a “state” the second select element must contain only that cities which exists in selected state.
use jquery
appendto append the option values (also remember to clear the options outside the iterating loop using$('#city_name').html("");