Thanks a lot Dav
I will post the final script for my app
Regards
--- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
>
> rodvela --
>
> Currently Target's do not fire events, you have to place all your
logic in the Drag instances event..
>
> Something like this:
>
> var tar1 = new YAHOO.util.DDTarget('tar1');
> var tar2 = new YAHOO.util.DDTarget('tar2');
>
> var dd = new YAHOO.util.DD('drag');
> dd.onDragDrop = function(e, id) {
> switch (id) {
> case 'tar1':
> myTar1Function();
> break;
> case 'tar2':
> myTar2Function();
> break;
> }
> };
>
> Does that make sense?
> Dav
>
>
> Dav Glass
> dav.glass@...
> blog.davglass.com
>
>
>
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine +
>
>
>
> ----- Original Message ----
> From: rodvela <rodvela@...>
> To: ydn-javascript@yahoogroups.com
> Sent: Tuesday, July 8, 2008 11:20:35 AM
> Subject: [ydn-javascript] how to call a function when an objects is
droped over a target object??
>
> Hi
>
> i am using the YAHOO.util.DDTarget to create several target elements..
>
> But i need then to fire a diferent function when an object is droped
> over them.
>
> So when an object is droped over target_1 i whant it to call a
> function, but if the same object is droped over target_2 i whant it to
> call a diferente function.
>
> I have seen that the onDragDrop works with elements, but it does not
> work with target elements...
>
> Can some one help me with this???
>
> Thanks a lot
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>