B
Better but still clumpsy
This function works as intended with Netscape/Modzilla.
But, it doesn't work with IE version 6.0.2900.2180.xpsp_sp2_rtm040803-2158.
Can someone tell me how to fix it?
Thanks.
function change_cell(y,x,my_piece)
{
var xx=0;
xx=x+1;
if (document.getElementById) {
var rowRef = document.getElementById(r);
} else if (document.all) {
var rowRef = document.all[r];
}
var theCells=document.getElementById('my_table').rows[y].cells;
if (!theCells[0]) theCells = rowRef.childNodes;
var r=document.getElementById('my_table').rows[y].cells;
while (r[xx].childNodes.length > 0)
r[xx].removeChild(r[xx].childNodes[0]);
var spanNode = document.createElement('img');
spanNode.src=my_piece;
spanNode.width=wl;
spanNode.height=wl;
r[xx].appendChild(spanNode);
}
But, it doesn't work with IE version 6.0.2900.2180.xpsp_sp2_rtm040803-2158.
Can someone tell me how to fix it?
Thanks.
function change_cell(y,x,my_piece)
{
var xx=0;
xx=x+1;
if (document.getElementById) {
var rowRef = document.getElementById(r);
} else if (document.all) {
var rowRef = document.all[r];
}
var theCells=document.getElementById('my_table').rows[y].cells;
if (!theCells[0]) theCells = rowRef.childNodes;
var r=document.getElementById('my_table').rows[y].cells;
while (r[xx].childNodes.length > 0)
r[xx].removeChild(r[xx].childNodes[0]);
var spanNode = document.createElement('img');
spanNode.src=my_piece;
spanNode.width=wl;
spanNode.height=wl;
r[xx].appendChild(spanNode);
}