Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
21
rated 0 times [  28] [ 7]  / answers: 1 / hits: 38625  / 13 Years ago, fri, december 23, 2011, 12:00:00

I'm using onClick in table rows as follows:



<tr onmouseover=this.style.cursor='pointer' onclick=http://www.whatever.com/index.php?var={$foo1}>


I also have some needs to put a link in certain areas in this table row, i.e.



<td>Stuff Here</td>
<td>Stuff Here</td>
<td>Stuff Here</td>
<td><a href=specialLink.php?var={$foo2}>Here</a></td>
<td>Stuff Here</td>


The problem is, the inner link (specialLink.php) can't be clicked, because the row link takes precedence. Do I have any options here?



Thanks


More From » html

 Answers
30

I 'll do that :



<script type=text/javascript>
var link=true;
</script>

<tr onmouseover=this.style.cursor='pointer' onclick=if (link) window.location ='http://www.whatever.com'>

<td>Stuff Here</td>
<td>Stuff Here</td>
<td>Stuff Here</td>
<td onmouseover=link=false; onmouseout=link=true;><a href=specialLink.php>Here</a></td>
<td>Stuff Here</td>

[#88397] Thursday, December 22, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
willieelisham

Total Points: 201
Total Questions: 108
Total Answers: 106

Location: Zambia
Member since Sat, Oct 31, 2020
4 Years ago
;