Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: can't stop linkClickEvent in datatable

Expand Messages
  • Martin Tschofen
    Thank you. That did the trick...martin
    Message 1 of 5 , Aug 4, 2008
    • 0 Attachment
      Thank you. That did the trick...martin

      On Mon, Aug 4, 2008 at 3:12 AM, Satyam <satyam@...> wrote:

      use

      YAHOO.util.Event.stopEven(ev.event);

      The argument to all custom events is an object composed of several
      members. In this case you have members event and target. Actually, in
      the docs you will see the argument called oArgs because it is an object
      containing several arguments. It is not the raw event argument by itself.

      Satyam



      Martin Tschofen wrote:
      > That's not working either (didn't know about that one).
      >
      > If I trap click events outside the datatable, then it works fine, but
      > I'd rather use the datatable event module.
      >
      > Any other idea what could be going on?
      >
      > Thanks...martin
      >
      > On Sun, Aug 3, 2008 at 5:45 PM, Caridy Patino <caridy@...
      > <mailto:caridy@...>> wrote:
      >
      > Hey Martin:
      >
      > Use stopEvent instead of preventDefault:
      >
      > preventDefault: Prevents the default behavior of the event.
      >
      > stopEvent: Convenience method for stopPropagation + preventDefault
      >
      > Best Regards,
      > Caridy Patino (caridy at yahoo-inc.com <http://yahoo-inc.com>) > <mailto:ydn-javascript%40yahoogroups.com>, "Martin Tschofen"

      >
      >
      > <martin.tschofen@...> wrote:
      > >
      > > I've got a link inside a cell of a datatable. I want to stop it from
      > > bubbling up and loading a new page.
      > >
      > > I've subscribed to the linkClickEvent and use
      > > YAHOO.util.Event.preventDefault to stop it, but it still goes
      > through.
      > >
      > > Any idea what I'm missing?
      > >
      > > Here's the relevant code:
      > > dataTable.subscribe('linkClickEvent',function (ev) {
      > > var tar = YuE.getTarget(ev);
      > > if(tar){
      > > YAHOO.util.Event.preventDefault(ev);
      > > var row = this.getTrEl(tar);
      > > my.showDetails(tar, row);
      > > }
      > > });
      > >
      > > utilities.js is loaded.
      > >
      >
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.138 / Virus Database: 270.5.12/1589 - Release Date: 03/08/2008 13:00
      >

    Your message has been successfully submitted and would be delivered to recipients shortly.