Contents Index Topic Contents | ||
Previous Topic: IHTMLOptionElement::put_value Next Topic: IHTMLOptionElement::put_defaultSelected |
IHTMLOptionElement::get_value
HRESULT get_value( BSTR *p );Retrieves the value of the given control. The value is submitted to the server as a name/value pair.
- Returns S_OK if successful, or an error value otherwise.
- v
- 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.
Control type Description 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. See also put_value
IHTMLOptionElement::put_value
HRESULT put_value( BSTR v );Specifies the value of the given control. The value is submitted to the server as a name/value pair.
- Returns S_OK if successful, or an error value otherwise.
- v
- String specifying 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.
Control type Description 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. See also get_value
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.