Ver Mensaje Individual
  #17 (permalink)  
Antiguo 03/08/2010, 15:08
cboretto
 
Fecha de Ingreso: julio-2010
Mensajes: 51
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: Tablas php y javascript!

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <title>Presupuesto</title>
  4. <link href="CSS2.css" rel="stylesheet" type="text/css" />
  5. <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
  6. <script language="javascript" type="text/javascript">
  7. function funcion (id, val) {
  8. var precio = document.getElementById(id+'_text').value;
  9. var total = parseInt(precio) * parseInt(val);
  10. alert(total)
  11. }
  12. </script>  
  13. </head>
  14. <div align="center">
  15.  
  16.  
  17. <table class='table' border=1><tr>
  18. <td><div class='letra1'><b>PRODUCTO</b></td><td><div class='letra2'><b>PRECIO</b></td><td><div class='letra1'><b>CANTIDAD</b></td><td><div class='letra2'><b>PRECIO_TOTAL</b></td><td><div class='letra1'><b>OK</b></td></tr>
  19. <tr class='th'><td class='td'>Cable Canal Kalop 100 x 50 </td><td>$21.25<input type='text' value='21.25' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 14 x 7  Adhesivo</td><td>$1.15<input type='text' value='1.15' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 14 x 7 Standard </td><td>$0.96<input type='text' value='0.96' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 18 x 21 Adhesivo</td><td>$2.98<input type='text' value='2.98' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 18 x 21 Standard</td><td>$2.34<input type='text' value='2.34' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 20 x 10 Adhesivo</td><td>$1.19<input type='text' value='1.19' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 20 x 10 Standard</td><td>$1.19<input type='text' value='1.19' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 27 x 30 </td><td>$5.92<input type='text' value='5.92' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 30 x 30 Ranurado</td><td>$8.08<input type='text' value='8.08' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 40 x 16</td><td>$4.01<input type='text' value='4.01' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 40 x 30 </td><td>$7.89<input type='text' value='7.89' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 50 x 80</td><td>$10.8<input type='text' value='10.8' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop 95 x 22  Megacanal</td><td>$16.8<input type='text' value='16.8' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form><tr class='th'><td class='td'>Cable Canal Kalop Color Madera 20 x 10</td><td>$1.82<input type='text' value='1.82' id='precio_0_hidden' name='precio_0-hidden' /></tr><td><input type='text' value='' id='precio_0' name'precio_0' onKeyUp='funcion(this.id, this.value)' /></tr><td><label/><td> <input type='checkbox' name='si' id='1' /></tr></form></table><br><form id='form1' name='form1' method='post' action='pre.php'><div align='center'> <input type='button' name='agrego' id='agrego' value='Agregar' /><input type='submit' name='nvo' id='nvo' value='Nueva Consulta' onClick='foco()'/><input type='submit' name='ver' id='ver' value='Ver Presupuesto' /><input type='button' name='cancel' id='cancel' value='Cancelar' onClick=''/></div></form></div>
  20. </body>
  21. </html>

GRACIAS POR LA PACIENCIA!