javascript - Updating Selectbox options -
i have 2 selectbox
- countrynames
- airports
and select countryname in first selectbox ajax request sent , returns list of airposts options
" <option value='1'>abc <option value='3'>lmn <option value='2'>xyz "
now have replace options of select tag. trying like
var country_select = document.getelementbyid("country_select"); country_select.options.length = 0; country_select.options = response.responsetext
but assignment not working how may done!
try
var country_select = document.getelementbyid("country_select"); country_select.innerhtml = response.responsetext;
Comments
Post a Comment