onclick event is not firing in anchor tag in firefox 4.1
<pre><code> var ni =  document.getElementById("fileDiv");
 var objFileCount = document.getElementById("fileCount");
 var num = (document.getElementById("fileCount").value - 1) + 2;
 objFileCount.value = num;

 var newdiv = document.createElement("div");

 var divIdName = "file" + num + "Div";
 newdiv.id = divIdName;
 //newdiv.setAttribute("id", divIdName);

 newdiv.innerHTML = '&lt;input type="file" name="attachment" id="attachment"/&gt; &lt;a name="#"  onclick="removeFile(' + divIdName + ');" style="color:blue;cursor:pointer;"&gt;Remove&lt;/a&gt; ';
 ni.appendChild(newdiv);



 function removeFile(divName) {
           alert(divName);

           var d = document.getElementById("fileDiv");
           d.removeChild(divName);
 }
</code></pre>
