ClearSelection - web automation method
Web macro method that clears any selection in HTML combo-box (drop-down) or list-box web controls.
Applies to:
- Element
elementObj.ClearSelection();
Arguments:
- None.
Remarks:
-
If the method is applied to an Element that is not a combo-box or list-box web control, then a web macro exception is
thrown and the lastError property is set to INVALID_OPERATION_ERROR.
Example:
// Assume nativeList is a <select multiple> HTML element.
// Clear the selection in the multiple selection list-box control.
var coreObj = new ActiveXObject("OpenTwebst.Core");
var list = coreObj.AttachToNativeElement(nativeList);
list.ClearSelection();
See also:
- AddSelection | AddSelectionRange | Element | GetAllSelectedOptions | Select | selectedOption | SelectRange
©
2017 CodeCentrix Software. All rights reserved.