effectAllowed property
[This documentation is preliminary and is subject to change.]
Sets or gets which data transfer operations are allowed for the object on the source element.
Syntax
HRESULT value = object.put_effectAllowed(BSTR v);HRESULT value = object.get_effectAllowed(BSTR* p);
Property values
Type: BSTR
copy
-
Selection is copied.
link
-
Selection is linked to the drop target by the data transfer operation.
move
-
Selection is moved to the target location when dropped.
copyLink
-
Selection is copied or linked, depending on the target default.
copyMove
-
Selection is copied or moved, depending on the target default.
linkMove
-
Selection is linked or moved, depending on the target default.
all
-
All drop effects are supported.
none
-
Dropping is disabled and the no-drop cursor is displayed.
uninitialized
-
Default. No value has been set through the IHTMLDataTransfer::effectAllowed property. In this case, the default effect still works, although it cannot be queried through this property.
Remarks
Set the IHTMLDataTransfer::effectAllowed property in the HTMLFrameSiteEvents::ondragstart event. This property is used most effectively with the IHTMLDataTransfer::dropEffect property.
This property can be used to override the default behavior in other applications. For example, the script can set the IHTMLDataTransfer::effectAllowed property to copy for a text field and override the Microsoft Word default of move. In the application, copy is the default IHTMLDataTransfer::effectAllowed behavior; however, anchors are set to link by default, and text fields are set to move by default.
By setting IHTMLDataTransfer::effectAllowed to none, dropping is disabled but the no-drop cursor is still displayed. To avoid displaying the no-drop cursor, cancel the returnValue of the HTMLFrameSiteEvents::ondragstart window.
See also
- Reference
- IHTMLDataTransfer::clearData
- IHTMLDataTransfer::getData
- IHTMLDataTransfer::setData
- Conceptual
- About DHTML Data Transfer
Build date: 6/12/2012