In fact, cloneNode does not cause errors. Divide your code into smaller pieces to determine the source of the error correctly:
var origOpt = source.options[i]; var clonedOpt = origOpt.cloneNode( true );
Or, returning it, as you have, all in one line:
dest.appendChild(source.options[i].cloneNode( true ));
gilly3
source share