Ver Mensaje Individual
  #9 (permalink)  
Antiguo 13/04/2007, 16:31
Avatar de gerson
gerson
 
Fecha de Ingreso: febrero-2005
Ubicación: Lima
Mensajes: 481
Antigüedad: 19 años, 2 meses
Puntos: 4
Re: Manejo De Arrays De Cajas De Texto Con Hiperenlaces

Hola EDWINSANCHEZ bueno creo q el problema en tu caso es javascript.

ahi coloque una funcion que te muestra de de muestra en un alert el valor de el valor de cada cuadro de texto; claro que si quieres procesarlo puedes hacer un location y pasar el valor por GET.
Código PHP:
<script>
function obt_val(nro){
    alert("Valor de " + document.getElementById('txtdescArticulo['+ nro +']').value);
}
</script>
<form name="opt" method="post" action="#">
<table border="2" align="center" bordercolor="#ECE9D8">
<tr>
<th>Artículo</th>
<th>Descripción</th>
<th>Centro de Costos</th>
<th>Cantidad</th>
<th>Precio</th>
<th>Impuesto</th>
<th>Importe</th>
<th>Total</th>
</tr>
<?php
$txtNroProductos 
5;
for (
$i=0;$i<$txtNroProductos;$i++)
{
?>
<tr>
<td height="22" width="20" bordercolordark="#454560"><input type="text" size="10" name="txtidArticulo[]">
</td>
<td height="22"><input type="text" name="txtdescArticulo[]" id="txtdescArticulo[<?php echo $i?>]"><a href="javascript: obt_val(<?php echo $i?>)">Ayuda</a></td>

<td height="22" width="20"><input type="text" size="10" name="txtvccArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtcantArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtprecioArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtimpuestoArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txtimporteArticulo[]"></td>
<td height="22" width="20"><input type="text" size="10" name="txttotalArticulo[]"></td>
</tr>
<?php
}
?>
</table >
</form>
Espero que de utilidad.

Saludos
__________________