I have a select, and I am filling the options using javascript. Something like
var select = document.getElementById(\"selectBox\"); for (var i = 0;
Use add instead of appendChild:
add
appendChild
select.add(option);
Also, using the Option constructor can save you some lines of code:
Option
var option = new Option(data[i].name, data[i].id);