Click to return to the Reusing Browser Technology home page    
IHTMLInputTextElement::ge...     InputTextElement::select ...     IHTMLInputTextElement Int...    
Web Workshop  |  Reusing Browser Technology

IHTMLInputTextElement::get_value Method


Retrieves the default or selected value of the given control.

Syntax

HRESULT get_value(
    BSTR *p 
);

Parameters

p
Address of a variable that receives the value. It can be any valid string. The purpose of the string depends on the type of control, as described in the following table.

checkbox The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value.
file The value, a file name, typed by the user into the control. Unlike other controls, this value is read-only.
hidden The control submits this value when the form is submitted.
OPTION The selected value. The containing list box control submits this value only if the user has selected the option.
password The default value. The control displays this value when it is first created and when the user clicks the reset button.
radio The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value.
reset The button label. If not set, the label defaults to Reset.
submit The button label. If not set, the label defaults to Submit.
text The default value. The control displays this value when it is first created and when the user clicks the reset button.

Return Value

Returns S_OK if successful, or an error code otherwise.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

IHTMLInputTextElement::put_value Method


Sets the default or selected value of the given control.

Syntax

HRESULT put_value(
    BSTR v 
);

Parameters

v
String that specifies the value. It can be any valid string. The purpose of the string depends on the type of control, as described in the following table.

checkbox The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value.
file The value, a file name, typed by the user into the control. Unlike other controls, this value is read-only.
hidden The control submits this value when the form is submitted.
OPTION The selected value. The containing list box control submits this value only if the user has selected the option.
password The default value. The control displays this value when it is first created and when the user clicks the reset button.
radio The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value.
reset The button label. If not set, the label defaults to Reset.
submit The button label. If not set, the label defaults to Submit.
text The default value. The control displays this value when it is first created and when the user clicks the reset button.

Return Value

Returns S_OK if successful, or an error code otherwise.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.