I have a span on top of a div. The div has an onclick event, and the span also has an onclick event. If I click on the span, I want only the span-onclick event to be triggered, unfortunately, both the onclick of the div and the one of the span are triggered. How can this be fixed?
<div class="listRow" onclick="document.location = 'index.php?c=rooms&a=displayForm&roomID=3&returnTo=%2FschoolTool%2Findex.php%3Fc%3Drooms%26a%3DshowList';">
<span class="tools listCell">
<span class="tool" onclick="if(confirm('Vil du virkelig slette dette rommet?')) { document.location = 'index.php?c=rooms&a=delete&roomID=3'; }">
Slett
</span>
</span>
</div>