i have a function in JavaScript for detecting every object clicked.
document.addEventListener("click", reply_click);
function reply_click(evt){
evt = evt || window.event;
evt = evt.target || evt.srcElement;
alert(evt.id);
}
and i have html code that contain table and every row have an id. the html code is :
<table id='tableid1'>
<tr id="rowid1" class='handz'>
<td id='tdid1'><font id='fontid1'>hello</font></td>
</tr>
</table>
i want a method (not onclick event for tr) to when click on table row or table td or text inside td that be able to detect tr id? any help or suggesting will be appreciated.