Append more than one control to div
<p>Ok this will be quick. I am collecting data in div by inserting hidden input boxes before i eventually submit to the server.
here is Javascript code.</p>

<pre><code>function appendToDiv()
{
 var mydiv=document.getElementById("somediv");
 var mydata=document.getElementsByName("description")[0].value;
 var myurl=document.getElementsByName("url")[0].value;
 var data=mydata+myurl;
 mydiv.innerHTML="&lt;input type='hidden' name='sUrl[]' value='"+data+"'/&gt;"
}
</code></pre>

<p>I have an onchange event that keeps calling the above guy until i am satisfied that i have all i need to send to the server.Problem is only one input get appended to the div.What could i be missing.</p>
