Availability: |
| |||
Property/method value type: | Boolean primitive | |||
JavaScript syntax: | - | myObject.ondragdrop = aHandler | ||
HTML syntax: | <BODY onDragDrop="aHandler"> <FRAMESET onDragDrop="aHandler"> <HTMLTag onDragDrop="aHandler"> | |||
Argument list: | aHandler | A 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.
Prev | Home | Next |
onDrag | Up | onDragEnd |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |