Removing dynamically added form fields
<p>OK, I'm out of ideas here. I have some JavaScript that was apparently written by someone a while ago. In short, there is a button that calls a JS function. The function is to remove form fields that were added just prior. It works in IE 8 and older, but not in IE9 or FireFox. The function is:</p>

<pre><code>function remove(salNum) {

    var fld
    fld = document.getElementById('salary' + salNum);
    fld.value = 0;

    document.forms[0].submit();

}
</code></pre>

<p>The output in the FireBug console gives and error:</p>

<pre><code>fld is null
fld.value = 0;
</code></pre>

<p>What am I missing?</p>
