simplemente mueve la creación de los elementos dentro del for:
Código javascript
:
Ver originalfunction addFormField (form, fieldType, fieldName, fieldValue){
if (document.getElementById){
for (m=0; m <cant ;++m){
fila = document.createElement("tr");
columnas = document.createElement("td");
columnas.setAttribute("width", "144px");
var input = document.createElement('INPUT');
var div = document.createElement('DIV');
var cant = document.all.cantidad.value;
input.type = fieldType;
input.name = fieldName;
input.value = document.all.txtfec.value;
alert (m);
input.style.width="50px";
columnas.appendChild(input)
fila.appendChild(columnas)
div.appendChild(input);
document.getElementById('ficheros').appendChild(di v);
}
}
}
Procura usar las etiquetas para código en el foro e tabular tu código, así es mucho más fácil para quien quiere ayudarte.