innerHTML no funca dentro del TBODY, pero creo que ya te lo solucioné
Cita: <script language="javascript">
var a;
function cantidad (id)
{
if (document.forms[0].pjs.value != 0)
{
var tbody = document.getElementById(id).getElementsByTagName(" TBODY")[0];
temp = document.getElementById("raw");
if (a>0)
{
for(w=1;w<a+1;w++){
tbody.removeChild(document.getElementById('raw'+w) );
}
}
for (a=1;a<=document.forms[0].pjs.value;a++)
{
var row = document.createElement("TR");
row.id = "raw"+a;
var td1 = document.createElement("TD");
td1.width = "70px";
td1.appendChild(document.createTextNode("Personaje :"));
var td2 = document.createElement("TD");
td2.width = "15px";
var img1 = document.createElement("IMG");
img1.src="system/images/empty.gif";
img1.width = "0";
td2.appendChild(img1);
var td3 = document.createElement("TD");
var input1 = document.createElement("INPUT");
input1.type = "text";
input1.name = "pj" + a;
td3.appendChild(input1);
var td4 = document.createElement("TD");
td4.width = "20px";
var td5 = document.createElement("TD");
td5.width = "20px";
td5.appendChild(document.createTextNode("Nivel:")) ;
var td6 = document.createElement("TD");
td6.width = "15px";
var img2 = document.createElement("IMG");img2.src="system/images/empty.gif";
img2.width = "0";
td6.appendChild(img1);
var td7 = document.createElement("TD");
var input2 = document.createElement("INPUT");
input2.type = "text";
input2.name = "pj" + a;
td7.appendChild(input2);
row.appendChild(td1);
row.appendChild(td2);
row.appendChild(td3);
row.appendChild(td3);
row.appendChild(td4);
row.appendChild(td5);
row.appendChild(td6);
row.appendChild(td7);
tbody.appendChild(row);
}
}
}
</script></head>
uno de los errores era que si tenias 20 inputs, las veite filas iban a tener el mismo id, con el cambio cada fila tiene su id "row1" para la primera y "row20" para la última.
No se si es lo más optimo, pero funciona (al menos para mi).
saludos y disculpa por equivocar el rumbo en algun momento