I am dynamically creating elements with javascript that end up looking something like this:
<select id="splitUserDDL" name="splitUserDDL[]"></select>
When I attempt to add options, it seems that the first select box is being populated but not the rest. Is there a way that I can add the same options to all of the select boxes?
$('#splitUserDDL').empty();
var userDDL = document.getElementById('splitUserDDL');
var defaultoption = document.createElement('option');
defaultoption.text = '-Select-';
defaultoption.value = 0;
userDDL.add(defaultoption);
id? If they do, that's invalid HTML and your exact problem. Also, why are you creating a 'label'option, rather than using an<optgroup>with alabelattribute?document.getElementByIdjust returns the first match.id="splitUserDDL"useclass="splitUserDDL"