droppable <tr>, disable childs <a> onclick

droppable <tr>, disable childs <a> onclick

Hello,
I have a droppable <tr> which contains some <a> links. Those links have a onclick function:

  1. <tr id="myselector"><td><a onClick="doFunctionA()">foo</a></td></tr>


On the drop even on the <tr> element, I do another function:

  1.     $("#myselector tr").droppable({
  2.        
  3.         drop: function(event, ui) {
  4.                   ...
  5.             }
  6.     });

The problem is that when I drop something on the link, the "doFunctionA" is called and then only the function defined  on the tr element.

How can I disable the doFunctionA() in this case ? I tried overriding it in the "ondrop" function:

  1.     $("#myselector tr").droppable({
  2.        
  3.         drop: function(event, ui) {
  4.                   $(this).find('a').first().click(function(e) {});
  5.             }
  6.     });

but this doesn't work.

EDIT: I'm actually dragging one tr to another and it's the onClick() of the tr being dragged which is called. So I have the override that onClick event.

  1. ui.draggable.find('a').removeAttr("onclick");


A better solution would be to dump the onClick event totally and do it also in jquery.

This topic is solved :)

T.