asp.net.ph

ondragenter Event

DHTML Events


Fires on the target element when the object being dragged enters a valid drop target.

Syntax


Inline HTML <element ondragenter = "handler" ... > All platforms
Event property object.ondragenter = handler ECMA-262 Language Specification
Named script <script FOR=object EVENT = ondragenter> Internet Explorer® only

Remarks


Bubbles Yes
Cancels Yes
To invoke
  • Drag the selection over a valid drop target within the browser.
  • Drag the selection to a valid drop target within another browser window.
Default action Calls the associated event handler.

The ondragenter event is the first of the target events to fire during a drag operation. Target events use the getData method to stipulate what data and data formats to retrieve. The list of drag-and-drop target events includes:

Event Object Properties

While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.

Event Object Properties


Example

The example shows the order of event firing for both source and target drag-and-drop events.

The following example illustrates when and where each event fires during a drag-and-drop operation by listing each event and the name of the object firing it in a list box.

Sample Code


Applies To

A, ACRONYM, ADDRESS, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DFN, DIR, DIV, DL, document, DT, EM, FIELDSET, FONT, FORM, Hn, HR, HTMLAREA, I, IMG, INPUT, KBD, LABEL, LI, LISTING, MAP, MARQUEE, MENU, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

Data Transfer Overview, ondragstart




Contents
HTML Elements
HTML Element Attributes
CSS Attributes
DOM Objects
DOM Object Properties
DOM Events Reference
DOM Methods Reference
DOM Collections Reference
 

Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph