tried something like below , but still it will take some more efforts to get it working -
function AddRow() {
var table = document.getElementById( 'insertorder' );
var tbody = table.getElementsByTagName( 'TBODY' )[ 0 ];
var numRows = tbody.rows.length;
if(numRows >12)return false;
var where = tbody.rows[ numRows - 1 ];
var newRow = emptyRow.cloneNode( true );
for(var i=0; i<tbody.rows.length; i++)
{
var new_name = "l2pn";
for(var j=0; j<tbody.rows[i].childNodes.length; j++)
{
alert(">>"+tbody.rows[i].childNodes[j].childName+">>");
tbody.rows[i].childNodes[j].setAttribute('name',new_name);
}
}
insertAfter( where, newRow, numRows );
}
function insertAfter( here, newNode, numRows) {
here.parentNode.insertBefore( newNode, here.nextSibling );
//var here_name = here.name;
//alert(numRows+">>"+document.getElementByTagName('here.nextSibling'));
//alert(">>"+here_name+">>"+here_name.substring(1,2));
var newNode_name = '';
// document.getElementByTagName('').style.name =
}
Reputation Points: 29
Solved Threads: 76
Practically a Master Poster
Offline 616 posts
since Sep 2009