Ver Mensaje Individual
  #8 (permalink)  
Antiguo 05/10/2011, 17:30
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 9 meses
Puntos: 1567
Respuesta: evento onclick en tr

quizás este método te sea más facil, no necesitas javascript (salvo el evento onclick="window.location.href='url'" en el tr)
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>click en fila</title>
  5. <style type="text/css">
  6. /*<![CDATA[*/
  7.       td{
  8.       cursor: pointer;
  9.       }
  10.      td.eliminar a{
  11.      display:block;
  12.      width: 100%;
  13.      height:100%;
  14.      text-decoration: none;
  15.      z-index: 1;
  16.      }
  17.      table.c1 {width:50%;margin:0 auto;}
  18. /*]]>*/
  19.  
  20. </head>
  21. <table border='1' class="c1">
  22. <tr onclick="window.location.href='http://goolge.com'">
  23. <td>Info 1</td>
  24. <td>Info 1</td>
  25. <td>Info 1</td>
  26. <td class="eliminar">eliminar</td>
  27. </tr>
  28. <tr onclick="window.location.href='http://goolge.com'">
  29. <td>Info 2</td>
  30. <td>Info 2</td>
  31. <td>Info 2</td>
  32. <td class="eliminar"><a href="http://microsoft.com">eliminar</a></td>
  33. </tr>
  34. </body>
  35. </html>
De esa manera el evento onclick sobre el tr no afectará a la celda eliminar porque esta en realidad será ocupada en su totalidad porel link que contiene


Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.