Código Javascript:
Ver original
<script language="javascript"> var fila= null; function cogerDato(obj, id_aviso) { obj.style.background = 'grey'; if (fila != null && fila != obj) fila.style.background = 'white'; fila = obj; window.location ="plantilla_factura.php?id="+id_aviso; } </script> <body> <div id="aparato"> <table width="100%"> <thead> <tr> <tr bgcolor=#DFEBFF id=t70 onclick='coloreaf(70,1)' onMouseOver='coloreamosin(70,1)' onMouseOut='coloreamosout(70,1)'> <th><span title="aparato">Nº Aviso</span></th> </tr> <?php do { ?> <tr ondblclick="cogerDato(this, ' + *String.fromCharCode(39) + <?php echo $row_ap_usuarios['id_aviso']; ?> + String.fromCharCode(39) *+ ')" > <th><?php echo $row_ap_usuarios['id_aviso']; ?></th> </tr> <?php } while ($row_ap_usuarios = mysql_fetch_assoc($ap_usuarios)); ?> </thead> <tbody> </tbody> </table> </div> </body> </html>
Un saludo