<p>I have a dl containing some input boxes that I "clone" with a bit of JavaScript like:  </p>

<pre><code>var newBox = document.createElement('dl'); 
var sourceBox = document.getElementById(oldkey); 
newBox.innerHTML = sourceBox.innerHTML; 
newBox.id = newkey;          
document.getElementById('boxes').appendChild(columnBox);   
</code></pre>

<p>In IE, the form in sourceBox is duplicated in newBox, complete with user-supplied values.  In Firefox, last value entered in the orginal sourceBox is not present in newBox.  How do I make this "stick?"</p>

You could try the
```
cloneNode
```
method. It might do a better job of copying the contents. It should also be faster in most cases
```
```
var newBox;
var sourceBox = document.getElementById(oldkey);
if (sourceBox.cloneNode) 
    newBox = sourceBox.cloneNode(true);
else {
    newBox = document.createElement(sourceBox.tagName); 
    newBox.innerHTML = sourceBox.innerHTML; 
}
newBox.id = newkey;              
document.getElementById('boxes').appendChild(newBox);
```
```