Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts

    ie6 unknown error code 0

    this works no prob. in FF
    Code:
    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
    Last edited by BubikolRamios; 01-23-2009 at 10:10 PM.

  • #2
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    ok the prob is , there is a size limit to IE6 inner HTML

    so, is there a way to do;

    Code:
    //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);

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    the solution:

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •