Hello,
I am new to javascript. I am trying to get the cell values of a html table in the following way, but I am not able to increase the variable dynamically! Does any one see where is my problem
Sorry for my english!!
function validateRow(frm)
{
var oTBL = document.getElementById('myTable');
var lastRow = oTBL.rows.length - 1;
var i;
for (var x = 1; x < oTBL.rows.length; x++) {
var y = 1;
//I am getting error here
var (bRow+x) = (oTBL.rows[x].cells[y].firstChild.data);
var aRow = document.getElementById('txtRow' + x);
if (aRow.value.length <= 0) {
alert('Row ' + x + ' is empty');
return;
}
}
openInNewWindow(frm);
}
function openInNewWindow(frm)
{
// open a blank window
var aWindow = window.open('', 'TableAddRowNewWindow',
'scrollbars=yes,menubar=yes,resizable=yes,toolbar=no,width=400,height=400');
// set the target to the blank window
frm.target = 'TableAddRowNewWindow';
// submit
frm.submit();
}