Ajax, Html: can't generate the content of SELECT tag

Posted by Syom on Stack Overflow See other posts from Stack Overflow or by Syom
Published on 2010-05-02T17:27:09Z Indexed on 2010/05/02 17:38 UTC
Read the original article Hit count: 251

Filed under:
|

i have the following html code

<select id="c0"  name="countries" onchange="show_other()">
  <option value="1">something</option>
  <div id="c1">

  </div>
</select>

i have the option "something", and i want to generate other options via Ajax. but if i try to this

  document.getElementById('c1').innerHTML = xmlhttp.responseText 

it doesn't work, but

 document.getElementById('c0').innerHTML = xmlhttp.responseText 

works fine, but i need to keep the first option. could you explain what is the problem? thanks

© Stack Overflow or respective owner

Related posts about html

Related posts about AJAX