repeat element by javascript
<p>I want to repeat these elements:
contain a cell and select menu bring data from the database through while</p>

<pre><code>&lt;div id="orginal"&gt;
&lt;td width="99"&gt;
    &lt;select name= "certificate"  id="xx" 
    onchange="BK.Ajax.Updates('newfile.php?id='+document.getElementById('xx').value,'ajx');" size="1"&gt;
        &lt;option&gt;.....&lt;/option&gt;
        &lt;?
        $sql_company=mysql_query("select * from company");
        while ($row=mysql_fetch_array($sql_company))
        {
            echo "&lt;option value='$row[id]'&gt; ";
            echo $row['name'] ;
            echo "&lt;/option&gt;";
        }
        ?&gt;&lt;/select&gt;

    &lt;/td&gt;
</code></pre>

<p></p>

<p>in another div:</p>

<pre><code>&lt;div id="wrapper"&gt;
&lt;/div&gt;
</code></pre>

<p>Using Javascript code:</p>

<pre><code>&lt;script language="javascript"&gt;
function repeat()
{
var el = document.createElement('div');
var oldHTML = document.getElementById('orginal').innerHTML;
el.innerHTML = oldHTML;
document.getElementById('wrapper').innerHTML = el;
}
&lt;/script&gt;
</code></pre>
