[Project_owners] dragging and being dropped

Erwin Wessels erwin at transpontine.com
Fri Oct 10 16:09:00 EDT 2003

Hi Eelco,

Looking at http://www.xulplanet.com/tutorials/xultu/dragdrop.html (and 
following pages) will probably help you further.
I'm not quite sure I understand your question fully, though... On the 
one hand you seem to be looking for ondragdrop, but then you say you 
need something else. One thing I can say: apart from ondraggesture, 
ondragdrop and ondragexit, you also have ondragenter and ondragover. To 
quote from above page:

      This event handler is called for an element when something is
      being dragged over top of it. If the object can be dropped on the
      element, the drag session should be notified.
      Called for an element when the mouse pointer first moves over the
      element while something is being dragged. This might be used to
      change the appearance of the element to indicate to the user that
      the object can be dropped on it.

Good luck,


Eelco van Kuik wrote:

> Hi.
> I asked this question in the consultants page, but I received no 
> answer up to now.
> Therefore I thought I could post it here as well.
> Suppose I have a draggable object, i.e. a Label. I can get the events for
> starting a drag (ondraggesture), when something is dropped on it 
> (ondragdrop),
> or when an item that is being dragged leaves the object (ondragexit).
> However, I can't find the event when an item being dragged (in this 
> case the label)
> is being "dropped", the opposite event of ondraggesture.
> Maybe why I need to know this would clear things:
> If somebody would like to bookmark a search engine i.e. google. He or 
> she would have to
> go to www.google.com <http://www.google.com/> and he or she can then 
> drag some values into the browser window
> and drop them on the textfield where you have to enter the 
> searchterms. Somewhere in Mozilla
> the object that is being dropped on is known, since google's textfield 
> is filled with text, that I want to,
> but how do I find out, which object this was?? How do I get a 
> reference/id, something else to it?
> Regards,
> Eelco van Kuik
> Project owner of the NeedleSearch Toolbar
>Project_owners mailing list
>Project_owners at mozdev.org

This is a signature.

More information about the Project_owners mailing list