Hide table row based on a value within text input
<p>I found javascript example on this site that hides rows based on reading a value directly within a cell within the row, but I need it to read the value within a text input field. </p>

<p>Here's the javascript I'm using:</p>

<pre><code>function hide() {
var tbl = document.getElementById('Table'),
    rows = tbl.tBodies[0].children, l = rows.length, i,
    filter = function(cells) { 
        var values = [
            parseInt(cells[0].firstChild.nodeValue.replace(/,/g,''),10),
            parseFloat(cells[1].firstChild.nodeValue.replace(/,/g,''))
        ];
        if( values[1] &lt; 1) return false;
        return true;
    };
for( i=0; i&lt;l; i++) {
    if( !filter(rows[i].cells)) rows[i].style.display = "none";
}
}
</code></pre>

<p>Here's the HTML:</p>

<pre><code> &lt;tr&gt;
&lt;tdRow 1&lt;/td&gt;
&lt;td&gt;1&lt;input id="Quantity1" name="Quantity1" class="numericValue" type="text" value="1" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Row 2&lt;/td&gt;
&lt;td&gt;2&lt;input id="Quantity2" name="Quantity2" class="numericValue" type="text" value="2" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Row 3&lt;/td&gt;
&lt;td&gt;3&lt;input id="Quantity3" name="Quantity3" class="numericValue" type="text" value="0" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Row 4&lt;/td&gt;
&lt;td&gt;4&lt;input id="Quantity4" name="Quantity4" class="numericValue" type="text" value="0" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Row 5&lt;/td&gt;
&lt;td&gt;0&lt;input id="Quantity5" name="Quantity5" class="numericValue" type="text" value="0" /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;input id="btnSubmit" onclick="hide();" type="submit" value="Hide" /&gt;&lt;/p&gt;
</code></pre>

<p>As is, the js will read the "0" in Row 5 and hide it, but I want Rows 3,4, and 5 with the input values of "0" to be hidden. How do I get at the input value? this is for a table in which the input values will all start at "0" (for a quantity), then one or more of the values will be changed.</p>

<p>Thanks.</p>
