fill select (drop down) element dynamically
I have a select (combo box) element that gets filled with items when selected item changed in another one (master combo box). It works in Chrome, FireFox but not in IE (all latest browser versions).
How do I populate the items in the child combo box:
- ajax call of a PHP script
- that returns items for the combo box: echo '<option value="' . $id . '">' . $name . '</option>';
- setting innerHTML attribute of the child combo box to a value that gets returned by the ajax call: document.forms['parametersForm'].elements['stationId'].innerHTML = html;
Thanks for your future help!