JavaScript » eventhandler » onDragDrop

onDragDrop = myJavaScriptCode

Event handler for Window.

The onDragDrop event handler executes the specified JavaScript code or function on the occurance of a DragDrop event. This is when an object, such as a shortcut or file, is dragged and dropped into the browser window. If the event handler returns true, the browser will attempt to load the dropped item into its window, and if false the drag and drop process is cancelled.

The onDragDrop event handler uses the following Event object properties.

data - this property returns the URLs of any dropped objects as an Array of Strings.
type - this property indicates the type of event.
target - this property indicates the object to which the event was originally sent.
screenX - the cursor location when the click event occurs.
screenY - the cursor location when the click event occurs.
modifiers - lists the modifier keys (shift, alt, ctrl, etc.) held down when the click event occurs.

See Also: