I'm dynamically building a table. One of the the things I'm adding is a combo box... This combo box is a clone of an already existing hidden combo box. here is the code I use to clone it, but I don't know how to change the value in javascript.
*1 is the line where I am trying to set the selected value. selected source is equal to the value I want to have selected... can anyone point out what I'm doing wrong? what attribute should I be setting.
var cellSecond = row.insertCell(1);
var myElement = document.getElementById('sourceBase');
var el = myElement.cloneNode(true);
el.setAttribute('selected',selectedSource); //*1
el.setAttribute('name','e_source');
cellSecond.appendChild(el);