...

View Full Version : ie6 unknown error code 0



BubikolRamios
01-23-2009, 10:06 PM
this works no prob. in FF


var newRow =document.getElementById('tbl1').insertRow(1);
// shows correct HTML as expected
alert(document.getElementById('tbl1').getElementsByTagName('tr')[2].innerHTML);
// shows correct '' as expected
alert(newRow.innerHTML);
// unknown error ?
newRow.innerHTML = document.getElementById('tbl1').getElementsByTagName('tr')[2].innerHTML

BubikolRamios
01-23-2009, 10:45 PM
ok the prob is , there is a size limit to IE6 inner HTML

so, is there a way to do;



//create a copy of row object which already exists in table
newRow = document.getElementById('tbl1').getElementsByTagName('tr')[1].cloneNode(true);
// this of course does not work, how to do it ?
document.getElementById('tbl1').insertRow(1,newRow);

BubikolRamios
01-23-2009, 11:24 PM
the solution:



oldRow = document.getElementById('tbl1').getElementsByTagName('tr')[1];
newRow = oldRow.cloneNode(true);
oldRow.parentNode.insertBefore(newRow, oldRow);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum