Hello!
I need to get value of dynamicly created textbox on
client script.
I use GetElementById( "mytext") but it doesnt work.
Any help appreciated.
function addRowToTable()
{
var tbl = document.getEle mentById('tblSa mple');
var lastRow = tbl.rows.length ;
// if there's no header row in the table, then
iteration = lastRow + 1
var iteration = lastRow;
var row = tbl.insertRow(l astRow);
// left cell
var cellLeft = row.insertCell( 0);
var textNode = document.create TextNode(iterat ion);
cellLeft.append Child(textNode) ;
// right cell
var cellRight = row.insertCell( 1);
var el = document.create Element('input' );
el.setAttribute ('type', 'text');
el.setAttribute ('name', 'txtRow' + iteration);
el.setAttribute ('size', '40');
cellRight.appen dChild(el);
}
function removeRowFromTa ble()
{
var tbl = document.getEle mentById('tblSa mple');
var lastRow = tbl.rows.length ;
if (lastRow > 2) tbl.deleteRow(l astRow - 1);
}