posted 14 years ago
the below code is adding a row in a table with a td of input, i am giving name of input is xyz, but when i tries to get refernce by using
document.getElementsByName("xyz")[0].value, then it is not picking its value
var tbl = document.getElementById('tblAddress');
var lastRow = tbl.rows.length;
var iteration = lastRow;
var row = tbl.insertRow(lastRow);
var cell0 = row.insertCell(0);
var el = document.createElement('input');
el.type = 'text';
el.NAME = 'xyz';
el.size = 30;
cell0.appendChild(el);