Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/05/2012, 08:17
cesar_viridi
 
Fecha de Ingreso: enero-2012
Ubicación: Mexico Df
Mensajes: 95
Antigüedad: 12 años, 4 meses
Puntos: 6
identifcar checbox true?

Hola amigos

Tengo un problema tengo una tabla con varias filas y por cada fila tengo un checkbox , cabe mencionar que estas filas vienen de una consulta

Código PHP:
Ver original
  1. <table cellspacing="0" border="1" align="center" width="100%">
  2. <tr>
  3.     <th width="5%">ID</th> 
  4.     <th width="15%">Fecha de Captura</th>
  5.     <th width="10%">Capturo</th>
  6.     <th width="30%">Concepto de Gasto</th>
  7.     <th width="20%"> Referencia Bancaria</th>
  8.     <th width="10%"> Abono</th>
  9.     <th width="25%"> Cargo</th>
  10.     <th width="10%"> Comprobado</th>
  11. </tr>
  12. <?
  13. while ($reg=mysql_fetch_array($sql)) {
  14.     $color++;
  15.     $suma_monto+=$reg['monto'];
  16.     $suma_saldo+=$reg['saldo'];
  17. ?>
  18.     <tr<?if($color%2==0){?> style="background:rgb(245,245,245);"<?}else{?> style="background:white;"<?}?>>
  19.         <td align="center"><? echo $reg['id_gasto'];?></td>
  20.         <td align="center"><? echo convierte_f($reg['fecha_captura']);?></td>
  21.         <td align="center"><? echo $reg['capturo'];?></td>
  22.         <td align="center"><? echo $reg['concepto'];?></td>
  23.         <td align="center"><? echo $reg['referencia_bancaria'];?></td>
  24.         <td align="right"><? echo amoneda($reg['saldo'],pesos);?></td>
  25.         <td align="right"><? echo amoneda($reg['monto'],pesos);?></td>
  26.         <?
  27.         if ($reg['comprobado']==0) {?>
  28.         <td align="center">
  29.             <input tyoe="checkbox" onclick="comrpobar();" >
  30.  
  31.                 </td>
  32.         <?}else{?>
  33.         <td align="center">
  34. <input tyoe="checkbox" onclick="comrpobar();" >
  35.            
  36.  
  37. </td>
  38.         <?}
  39.         ?>
  40.  
  41.     </tr>
  42. <?
  43. }
  44. ?>
  45.     <tr>
  46.         <td align="center"></td>
  47.         <td align="center"></td>
  48.         <td align="center"></td>
  49.         <td align="center"></td>
  50.         <td align="right"><strong>TOTAL:</strong></td>
  51.         <td align="right"><strong><? echo amoneda($suma_saldo,pesos);?></strong></td>
  52.         <td align="right"><strong><? echo amoneda($suma_monto,pesos);?></strong></td>
  53.         <td align="center"></td>
  54.     </tr>
  55. </table>

Código Javascript:
Ver original
  1.  

Pero la function comrpobar() no se como capturar que se le esta haciendo click a ese checkbox que podria hacer??

Gracias