marc_et_claude_89797788788415
New Member
Having difficulties retrieving values from a cell. When I run the code below only the first item is retrieved. The alert message shows "\[code\]11.95\[/code\]" which is correct, but on the next pass it shows "\[code\]11.95\[/code\]" again although the table cell contains "\[code\]20.95\[/code\]". The messages with "\[code\]11.95\[/code\]" repeats until all the rows have been read. Any help in debugging my code would be appreciated. Thanks\[code\]function calTotal(tableID){ try { var table = document.getElementById(tableID); var rowCount = table.rows.length; for (var i = 0; i < rowCount; i++) { var row = table.rows; var chkbox = row.cells[0].childNodes[0]; if (null != chkbox && false == chkbox.checked) { alert(row.cells[2].firstChild.nodeValue); rowCount--; i--; } } } catch (e) { alert(e); }}\[/code\]