If you want to use DOM to create a table row with a cell that has a colSpan attribute you are in for a surprise. Internet Explorer will produce an error if you try to set a colSpan attribute on a cell element.

Here is the solution

       var tr = document.createElement(’tr’);
           
       if(!document.all) {

            // non-IE browsers
            var td = tr.insertCell(0);
            td.colSpan = 4;   
            td.align = "center";       
        }
        else {           

            //IE code
            var td = document.createElement(’<td colspan="4" align="center"></td>’);                       
        }   
       
        td.innerHTML = "HELLO";
        tr.appendChild(td);