how can i iterate through a table using javascript to get values of cells 4 and 5
<p>how can i iterate through a table using javascript to get values of cells 4 and 5</p>

<p>This is what I have:</p>

<pre><code>functions constructString() {   
    var table=document.getElementById('wcList');

    for(var i=0; i&lt;table.rows.length;i++){

        var row = getElem(RowId + i)
        var str_wc=(table.rows[i].cells[1].firstChild.value);
        var str_act=(table.rows[i].cells[5].firstChild.value);
        var str_coh=(table.rows[i].cells[6].firstChild.value);
        var str_mconf=(table.rows[i].cells[7].firstChild.value);

        var string1=str_wc +row+str_act+row+str_coh+row+str_mconf+row;

     }
}
</code></pre>
