onDragDrop (Event handler)

Some data has been dropped onto a window.


JavaScript - 1.2
Netscape - 4.0
Property/method value type:Boolean primitive
JavaScript syntax:-myObject.ondragdrop = aHandler
HTML syntax:<BODY onDragDrop="aHandler"> <FRAMESET onDragDrop="aHandler"> <HTMLTag onDragDrop="aHandler">
Argument list:aHandlerA reference to a function object to handle the event

This is triggered when some data is dropped onto an object in the window. You can then access the data and decide what to do with it.

This event handler is most likely to be invoked when the user drags an item onto a window in Netscape.

To access the details of the entity that has been dragged into and dropped on the window, you need to inspect the data property of the Event object that is passed as an argument to the handler when it is called.

The data is a single URL when a single entity is dropped into the window or an array of strings, each containing a URL when a collection of entities are dropped onto a window. What you can then do with those entity references really depends on your platform and browser capabilities and what you can do to files on your client system given the security implications of browser access to the filesystem.

You will need UniversalBrowserRead privilege to access this data in Netscape.

The handler is registered either by assigning a function to the ondragdrop property or by defining it with an HTML tag attribute.

See also:Event, Event handler, Event model, Event names, Event object, Event.returnValue, Handler, onDrag, onDragEnd, onDragEnter, onDragLeave, onDragOver, onDragStart, onDrop, Semantic event, UniversalBrowserAccess, UniversalBrowserRead, Window.ondragdrop