Hi, I have an appendchild script that adds an <input> element when a current one is clicked. It then gets posted by a PHP script. Everything works perfectly in IE, but in Firefox, nothing gets posted.

Code JavaScript:
<script type="text/javascript">
 
var i=0;
function addElement() {
 
  var ni = document.getElementById('org_div1');
 
  var numi = document.getElementById('theValue');
 
  var num = (document.getElementById('theValue').value -1)+ 2;
 
  numi.value = num;
 
    var newDiv = document.createElement('div');
 
    var divIdName = num;
 
  newDiv.setAttribute('id',divIdName);
 
newDiv.innerHTML = ' '+num+' <input type="file" name="file' + (num) +' " onclick="addElement()"/> <a href=\'#\' onclick=\'removeElement('+divIdName+')\'>Remove the div "'+divIdName+'"</a>';
    // add the newly created element and it's content into the DOM
    ni.appendChild(newDiv);
}
 
    function removeElement(divNum) {
 
  var d = document.getElementById('org_div1');
 
  var olddiv = document.getElementById(divNum);
 
  d.removeChild(olddiv);
 
}
 
</script>

Anyone have any input?