Nevermind...
For some reason I always miss the obvious.
I needed element.parentNode.id as in:
Droppables.add('myDropB',
{
accept:'draggable',
onDrop:function(element, dropped){
alert (element.parentNode.id);
}
}
);
On Mar 29, 2006, at 3:24 PM, Greg Militello wrote:
I am not sure how many of you are using draggables/droppables but I
thought I would do some experimentation and try and learn how to
use them on my own.
Well, I have draggables, and I have droppables.
I do have one question for now.
The droppable onDrop event seems to pass in 2 objects, the dropped
object, and the container the object was dropped on. My question
is this, can I figure out the container the dropped object came from?
For example:
1 draggable (id: myDraggable)
2 divs (ids: myDropA, myDropB) which are both droppables accepting
the draggable
myDraggable starts as a child of myDropA
I move myDraggable from myDropA to myDropB
At this point in the myDropB onDrop, I want to know about myDropA,
myDropB and myDraggable. Currently I think I can only see myDropB,
and myDraggable
Feel free to ask questions if this makes no sense. It is after
all my first script.aculo.us drag/drop thingy-ma-bob.
-Greg
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs