javascript - Updating Selectbox options -


i have 2 selectbox

  1. countrynames
  2. 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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -