esta es la funsion de agregar filas a mi tabla html, pero kiero que lo k capture, y los resultados, los muestre en las lineas k se van creando... ok?
Código PHP:
function anadir() {
i = i + 1;
if (i <=9){
var table = document.getElementById('lineaPedido');
var row = table.insertRow(-1);
var cell, text;
for (var j=0; j<9; j++) {
cell = row.insertCell(0);
//text = 'Fila' + row.rowIndex + 'Aux' + i;
//input1 = document.createElement("input");
cell.setAttribute("id","miCol"+ j + "" + i);
if (j==8){
text = "";
cell.setattribute("id","col"+j+""+i);
cell.appendChild(document.createTextNode(text));
cell.innerHTML = "<button onclick=\"deleteRow(this)\">"+row.rowIndex+"</button>";
}else{
cell.appendChild(document.createTextNode(text));
}
}
}
}
Código PHP:
<th width="20" height="14" background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col" id="lineaPedido2"><span class="Estilo4 Estilo5 Estilo6">1</span></th>
<th width="50" height="14" background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col"><input type="text" id="Item" class="input" style="width:57px; height:14px" onblur="RecuperaDescripcion(this.id,this.value,'Itemno','Uomcode Description','datos_articulo')" maxlength="7"/></th>
<th background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col" width="70"><div id="datos_udm" style="font-size:14px"></div></th>
<td width="340" align="center" background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col"><div id="datos_articulo" class="Estilo3" style="font-size:10px; font-weight: bold"></div></td>
<th background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col" width="100"><div id="datos_ext1" style="font-size:14px"></div></th>
<th background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col" width="60"><div id="datos_zon1" style="font-size:14px"></div></th>
<th width="50" height="14" background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col"><input type="text" id="precio" class="input" style="width:50px; height:14px; text-align:center" maxlength="15"/>
</th>
<th width="50" height="14" background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col"><input type="text" id="cantidad" class="input" style="width:50px; height:14px; text-align:center" onblur="calculaPrecio(document.getElementById('precio').value,this.value)" maxlength="7"/></th>
<th background="images/bodyarea-bg.gif" bgcolor="#E0E0E0" scope="col" width="57"><span id="importe" class="Estilo3" style="font-size:11px;"> </span></th>
<tbody id="lineaPedido" class="fondo">
</table></tbody>
Código PHP:
<td id="miCol71">undefined</td>
<td id="miCol61">undefined</td>
<td id="miCol51">undefined</td>
<td id="miCol41">undefined</td>
<td id="miCol31">undefined</td>
<td id="miCol21">undefined</td>
<td id="miCol11">undefined</td>
<td id="miCol01">undefined</td>