Ver Mensaje Individual
  #10 (permalink)  
Antiguo 27/11/2012, 10:01
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 7 meses
Puntos: 10
Respuesta: Iluminar y marcar celda al pasar con el raton en una tabla.

Bueno, ya he podido ponerme y lo he sacado. Ahora quiero que debajo de la tabla:
Código Javascript:
Ver original
  1. <table width="100%"  id="list" border="1" class="aparatos4"  >
  2. <thead>
  3. <tr bgcolor=#9CF id=t70 ondblclick='coloreaf(70,1)' onMouseOver='coloreamosin(70,1)' onMouseOut='coloreamosout(70,1)'>
  4. <th><span title="selecc">Selecc.</span></th>
  5. <th><span title="num_aparato">NºAparato</span></th>
  6. <th><span title="aparato">Aparato</span></th>
  7. <th><span title="marca">Marca</span></th>
  8. <th><span title="modelo">Modelo</span></th>
  9. <th><span title="num_serie">NºSerie</span></th>
  10. <th><span title="num_producto">Cod/12nc</span></th>
  11. </tr>
  12.  </thead>
  13. <?php do { ?>
  14. <tr class="row" >  
  15. <th><input name="s" type="checkbox" class="check" value="<?=$row_ap_usuarios['NUM_APARATO'];?>"/></th> 
  16. <th><?php echo $row_ap_usuarios['NUM_APARATO']; ?></th>
  17. <th><?php echo $row_ap_usuarios['APARATO']; ?></th>
  18. <th><?php echo $row_ap_usuarios['MARCA']; ?></th>  
  19. <th><?php echo $row_ap_usuarios['MODELO']; ?></th>
  20. <th><?php echo $row_ap_usuarios['NUM_SERIE']; ?></th>
  21. <th><?php echo $row_ap_usuarios['NUM_PRODUCTO']; ?></th>       
  22. </tr>
  23. <?php } while ($row_ap_usuarios = mysql_fetch_assoc($ap_usuarios)); ?>
  24. <caption class="tb1CaptionBottom"></caption>
  25. </table>
Al hacer click en el checkbox se me rellenen las cajas de texto de la fila seleccionada:

Código Javascript:
Ver original
  1. <table width="100%">
  2.   <tr>
  3.     <td>Aparato</td>
  4.     <td><input name="aparato" type="text" /></td>
  5.     <td>Modelo</td>
  6.     <td><input name="modelo" type="text" /></td>
  7.     <td>NºSerie</td>
  8.     <td><input name="modelo" type="text" /></td>
  9.   </tr>
  10.   <tr>
  11.     <td>Marca</td>
  12.     <td><input name="marca" type="text" /></td>
  13.     <td>Cod/12Nc</td>
  14.     <td><input name="NUM_PRODUCTO" type="text" /></td>
  15.     <td>Revisión</td>
  16.     <td><input name="revision" type="text" /></td>
  17.   </tr>
  18. </table>

Gracias por vuestro tiempo.