Click events on overlapping items
Also I had a dropdown overlayed on a clickable element. So just use the following to prevent propagation to the underlying element for all modern browsers
onclick="yourfunctiontohandle();event.stopPropagation();"
For older cross browser solution, must use IE event.cancelBubble
onclick="if(event.stopPropagation) event.stopPropagation(); else event.cancelBubble=true;"
look at your code this is what you should do in the button click event stopPropagation
You can call an extra function onClick
this is the function:
function cancelBubble(e){
e.cancelBubble = true;
if(e.stopPropagation)
e.stopPropagation();
}
And button's onClick you can write like
onclick="yourfunctionname();cancelBubble(event)"
yourfunctionname:: is the name of your function you are already calling.
Using jQuery (due to question tag):
$('#yourButton').click(function(e) {
// stop event from bubbling up to row element
e.stopPropagation();
// now do your stuff
});