Javascript Remove Form Data
<p>I have a form that I want to only submit post data for value which have changed.  </p>

<p>So the way I have been doing this is like this:</p>

<pre><code>function submit_form(){
var hd = [];
// hd is a big array that is defined here
// hd ['some id_number'] = 'some value'
// main function
for (var id_number in hd ){
    var x=document.getElementById(id_number).selectedIndex;
    var y=document.getElementById(id_number).options;
    selector_text = y[x].text;
    if (hd[id_number] == selector_text){
        $(id_number).remove();
    }
}
document.forms["my_form"].submit()
}
</code></pre>

<p>So the goal is that if the selector equals what is in the array, then don't POST the data.</p>

<p>To do this I have been doing the remove function.  Everything up to the remove function works as expected.  However when I look at the post data I still get the selected value for the id_numbers that mach the value in hd.</p>

<p>Is there a better way to remove to prevent it from going to the POST data?  The id.parent.removeChild(id) method didn't work either.</p>
