Retrieves a pointer to the event handler function associated with the onselect event for an INPUT type=file element. An onselect event occurs at the beginning of a user-initiated select. This event can be canceled, and it participates in the bubbling model.
Syntax
HRESULT get_onselect( VARIANT *p );
Parameters
- p
- Address of a VARIANT structure that receives the script.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
Use the following code fragment to obtain an event handler.pBody->get_onEvent( &_variant_t(pDisp) ); // pDisp a pointer to an IDispatch interface // pBody a pointer to an element of interest
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
Sets a pointer to the event handler function associated with the onselect event for an INPUT type=file element. An onselect event occurs at the beginning of a user-initiated select. This event can be canceled, and it participates in the bubbling model.
Syntax
HRESULT put_onselect( VARIANT v );
Parameters
- v
- VARIANT structure that contains the new script.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
Use the following code fragment to set an event handler. This method will only add a single event handler. To add multiple event handlers, see the IHTMLDocument3::attachEvent, IHTMLElement2::attachEvent, and IHTMLWindow3::attachEvent methods.
pBody->put_onEvent( &_variant_t(pDisp) ); // pDisp a pointer to an IDispatch interface // pBody a pointer to an element of interest
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0