restrict event propagation in javascript

<tr id=”my_tr” onclick=”javascript:my_tr_click();”>
<a id=”my_atag” href=”javascript:void(0);” onclick=”javascript:var event = arguments[0] || window.event; my_a_click(event);”>Delete</a>

function my_tr_click() {
alert(‘tr click’);

function my_a_click(e) {
alert(‘td a click’);
e.cancelBubble = true;
if (e.stopPropagation)


About selvam4win

I am Selvam. I am very jolly person and frank one.

Posted on February 4, 2013, in javascript and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: