I have a table. Each row is a link to some page(for example - google.com) which called by js "onClick window.open" method:
<tr class='tr' onClick="win=window.open('http://google.com');win.focus();" >
In the last column I have an anchor href link to other page (for example - jsfiddle
):
<td class='td'><a href = "http://jsfiddle.net">JSFiddle</a></td>
If I click on anchor link it's opened, but also opened the first page called by onClick.
I've found a reverse issue:
How can I disable HREF if onclick is executed?
We can disable href by adding "return false" to onClick Event.
Is it possible to prevent onClick executing if anchor link was clicked?
Here is my demo: Fiddle
` tag.
– dfsq Feb 11 '14 at 13:54