ugrás a tartalomhoz

Dinamikus DIV IE-ben nem megy

hemu · 2008. Feb. 5. (K), 11.31
Sziasztok!
Bocs, hogy új témát nyitotam, de elég "egyedi" a bajom.
Adott egy kód:
  1. function createcp(name){  
  2.     layer = document.createElement("div");  
  3.     layer.id = name;  
  4.     layer.style.background = "#FFFFFF";  
  5.     layer.style.border = "1px solid black";  
  6.     layer.style.position = "absolute";  
  7.     layer.style.visbility = 'hidden';  
  8.     layer.style.top = yMousePos + "px";  
  9.     layer.style.left = xMousePos + "px";  
  10.     var colors = Array('FF','CC','00','99','66','33');  
  11.     if (!clrs){  
  12.         var clrs = Array();  
  13.         for (i = 0;i < colors.length;i++){  
  14.             for (j = 0;j < colors.length; j++){  
  15.                 for (k = 0;k < colors.length; k++){  
  16.                     clrs[clrs.length] = '#' + colors[i] + colors[j] + colors[k];  
  17.                 }  
  18.             }  
  19.         }  
  20.     }  
  21.     tabla = document.createElement("table");  
  22.     tabla.cellSpacing = 0;  
  23.     tabla.cellPadding = 0;  
  24.     for (i=0;i<clrs.length;i++){  
  25.         if(i%18==0){  
  26.             TR=document.createElement("tr");  
  27.             TR.style.height = 10 + 'px';  
  28.             tabla.appendChild(TR);  
  29.         }  
  30.         TD = document.createElement("td");  
  31.         TD.style.cursor = "pointer";  
  32.         TD.style.width = 10 + 'px';  
  33.         TD.style.height = 10 + 'px';  
  34.         TD.style.border = '1px solid white';  
  35.         TD.bgColor = clrs[i];  
  36.         TD.onclick = function(){colorFormat(this.bgColor,name)};  
  37.         TD.onmouseover = function(){this.style.border = '1px solid black';};  
  38.         TD.onmouseout = function(){this.style.border = '1px solid white';};  
  39.         TD.innerText = " ";  
  40.         TR.appendChild(TD);  
  41.     }  
  42.     layer.appendChild(tabla);  
  43.     document.body.appendChild(layer);  
  44.     document.getElementById(name).style.visibility = 'visible';  
  45. }  
Ez FF-ben gyönyörűen működik, de IE-ben a layer 1x1 pixeles, ha pedig direktben belövöm a méretét 100x100-asra mondjuk, a színeket tartalmazó tábla nem látszik rajta.
Van tippetek, mitől lehet?
Ha kialertelem a tabla változó innerHTML-ét, akkor szépen látszik, hogy a tábla rendben legenerálódott.

Üdv:
hemu