Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The ondragenter event activates when the when the user drags an element over a valid drop target as defined by the "drop targets" property on that element.  Information about the drag and drop operation is provided using the global pui.dragDropInfo object, which will contain the following properties:

  • dd element - reference to the drag and drop element being dragged
  • dd element id - the id of the drag and drop element
  • dd record number - the record number of the subfile record being dragged when the drag operation is being performed on a grid element
  • target element - reference to the drop target element
  • target element id - the id of the drop target element
  • target record number - the record number position where the element is about to be dropped when the target element is a grid
  • proxy - reference to the drag and drop proxy element; this will be the same as dd element if the "use proxy" property is not set
  • event - the browser's event object; this allows you to retrieve information such as mouse position, etc.
  • text - text description of the event

Example:

Draw a red border around the target element when the drag and drop element is over it:

ondragenter: pui.dragDropInfo["target element"].style.border = "2px solid red";

ondragleave: pui.dragDropInfo["target element"].style.border = "";

  • No labels