
This interface specifies a form input control.
IHTMLInputImage Methods
HRESULT get_type(
BSTR *p
);
Retrieves the type of intrinsic control represented by the given element object.
| Element | Possible value | Description |
| INPUT | checkbox | Used for simple Boolean attributes or for attributes that can take multiple values at the same time. It is represented by a number of check box fields, each of which has the same name. Each selected check box generates a separate name/value pair in the submitted data, even if this results in duplicate names. The default value for check boxes is on. |
| file | A file upload element. | |
| hidden | No field is presented to the user, but the content of the field is sent with the submitted form. This value can be used to transmit state information about client/server interaction. | |
| image | An image field which you can click, causing the form to be immediately submitted. The coordinates of the selected point are measured in pixel units from the upper-left corner of the image, and are returned (along with the other contents of the form) in two name/value pairs. The x-coordinate is submitted under the name of the field with .x appended, and the y-coordinate is submitted under the name of the field with .y appended. Any value property is ignored. The image itself is specified by the SRC attribute, exactly as for the Image element. | |
| password | The same as the TEXT attribute, except that text is not displayed as the user enters it. | |
| radio | Used for attributes that accept a single value from a set of alternatives. Each radio-button field in the group should be given the same name. Only the selected radio button in the group generates a name/value pair in the submitted data. Radio buttons require an explicit value property. | |
| reset | reset is a button that when clicked resets the form's fields to their specified initial values. The label to be displayed on the button can be specified just as for the submit button. | |
| submit | submit is a button that when clicked submits the form. You can use the value attribute to provide a non-editable label to be displayed on the button. The default label is application-specific. If a submit button is clicked to submit the form, and that button has a name attribute specified, then that button contributes a name/value pair to the submitted data. Otherwise, a submit button makes no contribution to the submitted data. | |
| text | Used for a single-line text-entry field. Use in conjunction with the size and maxLength property. | |
| SELECT | select-multiple | Specifies a multiple-select list box. |
| select-one | Specifies a single-select list box. | |
| TEXTAREA | textarea | Used for multiple-line text-entry fields. Use in conjunction with the size and maxLength properties. |
HRESULT put_disabled(
VARIANT_BOOL v
);
Enables or disables the control. A disabled control appears dimmed and does not respond to user input.
The default value for this property is FALSE.
See also get_disabled
HRESULT get_disabled(
VARIANT_BOOL *p
);
Determines whether the control is enabled or disabled.
The default value for this property is FALSE.
See also put_disabled
HRESULT put_border(
VARIANT v
);
Sets the thickness of the border around the element.
See also get_border
HRESULT get_border(
VARIANT *p
);
Retrieves the current thickness of the border around the element.
See also put_border
HRESULT put_vspace(
long v
);
Sets the vertical margins for the element.
Similar to border, except the margins are not painted with color when the element is a link.
See also get_vspace
HRESULT get_vspace(
long *p
);
Retrieves the vertical margins for the element.
Similar to border, except the margins are not painted with color when the element is a link.
See also put_vspace
HRESULT put_hspace(
long v
);
Sets the horizontal margins for the element.
Similar to border, except the margins are not painted with color when the element is a link.
See also get_hspace
HRESULT get_hspace(
long *p
);
Retrieves the horizontal margins for the element.
Similar to border, except the margins are not painted with color when the element is a link.
See also put_hspace
HRESULT put_alt(
BSTR v
);
Indicates optional text as an alternative to the graphic for rendering in nongraphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.
See also get_alt
HRESULT get_alt(
BSTR *p
);
Retrieves the optional text as an alternative to the graphic for rendering in nongraphical environments. Alternate text should be provided whenever the graphic is not rendered. Alternate text is mandatory for Level 0 documents.
See also put_alt
HRESULT put_src(
BSTR v
);
Sets the URL of an image to be shown.
See also get_src
HRESULT get_src(
BSTR *p
);
Retrieves the URL of the image.
See also put_src
HRESULT put_lowsrc(
BSTR v
);
Specifies the URL of a lower-resolution image to display.
Setting the SRC= attribute in code has the side-effect of actually starting to load the new URL into the image area (and aborting the transfer of any image data that is already loading into the same area). Therefore, you should alter the lowsrc property before setting the src property. If the URL in the src property refers to an image that is not the same size as the image cell it is loaded into, the source image is scaled to fit.
See also get_lowsrc
HRESULT get_lowsrc(
BSTR *p
);
Retrieves the URL of a lower-resolution image to display.
Setting the SRC= attribute in code has the side-effect of actually starting to load the new URL into the image area (and aborting the transfer of any image data that is already loading into the same area). Therefore, you should alter the lowsrc property before setting the src property. If the URL in the src property refers to an image that is not the same size as the image cell it is loaded into, the source image is scaled to fit.
See also put_lowsrc
HRESULT put_vrml(
BSTR v
);
Specifies the URL of a VRML world to be displayed in the window.
HRESULT get_vrml(
BSTR *p
);
Retrieves the URL of the VRML world to be displayed in the window.
HRESULT put_dynsrc(
BSTR v
);
Sets the address of a video clip or VRML world to be displayed in the window.
See also get_dynsrc
HRESULT get_dynsrc(
BSTR *p
);
Retrieves the address of a video clip or VRML world to be displayed in the window.
See also put_dynsrc
HRESULT get_readyState(
BSTR *p
);
Retrieves the current state of an object being downloaded.
| complete | The object is completely loaded. |
| interactive | The object can be interacted with even though it is not fully loaded. |
| loading | The object is currently being loaded. |
| unitialized | The object is not created. Usually when the object is being downloaded. |
Each object can independently determine which of the states it exposes.
HRESULT get_complete(
VARIANT_BOOL *p
);
Retrieves whether the specified element is fully loaded.
HRESULT put_loop(
VARIANT v
);
Sets the number of times a video will loop when activated.
Below are descriptions on how loop works for some boundary cases.
| <BGSOUND src="file:///c:\win95\system\msremind.wav"> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=> | zero times |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=-1> | infinitely |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=0> | once |
See also get_loop
HRESULT get_loop(
VARIANT *p
);
Retrieves the number of times a video loops when activated.
Below are descriptions on how loop works for some boundary cases.
| <BGSOUND src="file:///c:\win95\system\msremind.wav"> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=> | zero times |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=-1> | infinitely |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=0> | once |
See also put_loop
HRESULT put_align(
BSTR v
);
Sets how the element is aligned with adjacent text.
| absbottom | Aligns the bottom of the element with the absolute bottom of the surrounding text. The absolute bottom is equal to the baseline of the text minus the height of the largest descender in the text. |
| absmiddle | Aligns the middle of the element with the middle of the surrounding text. The absolute middle is the midpoint between the absolute bottom and texttop of the surrounding text. |
| baseline | Aligns the bottom of the element with the baseline of the surrounding text. |
| bottom | Aligns the bottom of the element with the bottom of the surrounding text. The bottom is equal to the baseline minus the standard height of a descender in the text. |
| left | Aligns the element to the left of the surrounding text. All preceding and subsequent text flows to the right of the element. This is the default value. |
| middle | Aligns the middle of the element with the surrounding text. |
| right | Aligns the element to the right of the surrounding text. All subsequent text flows to the left of the element. |
| texttop | Aligns the top of the element with the absolute top of the surrounding text. The absolute top is the baseline plus the height of the largest ascender in the text. |
| top | Aligns the top of the element with the top of the text. The top of the text is the baseline plus the standard height of an ascender in the text. |
For the INPUT element, this attribute applies only to the image type. It is undefined for all other types.
See also get_align
HRESULT get_align(
BSTR *p
);
Retrieves how the element is aligned with adjacent text.
| absbottom | Aligns the bottom of the element with the absolute bottom of the surrounding text. The absolute bottom is equal to the baseline of the text minus the height of the largest descender in the text. |
| absmiddle | Aligns the middle of the element with the middle of the surrounding text. The absolute middle is the midpoint between the absolute bottom and texttop of the surrounding text. |
| baseline | Aligns the bottom of the element with the baseline of the surrounding text. |
| bottom | Aligns the bottom of the element with the bottom of the surrounding text. The bottom is equal to the baseline minus the standard height of a descender in the text. |
| left | Aligns the element to the left of the surrounding text. All preceding and subsequent text flows to the right of the element. This is the default value. |
| middle | Aligns the middle of the element with the surrounding text. |
| right | Aligns the element to the right of the surrounding text. All subsequent text flows to the left of the element. |
| texttop | Aligns the top of the element with the absolute top of the surrounding text. The absolute top is the baseline plus the height of the largest ascender in the text. |
| top | Aligns the top of the element with the top of the text. The top of the text is the baseline plus the standard height of an ascender in the text. |
For the INPUT element, this attribute applies only to the image type. It is undefined for all other types.
See also put_align
HRESULT put_onload(
VARIANT v
);
Sets the inline script associated with the onload event for an INPUT type=image element. An onload event occurs immediately after the browser loads the given object.
See also get_onload
HRESULT get_onload(
VARIANT *p
);
Retrieves the inline script associated with the onload event for an INPUT type=image element. An onload event occurs immediately after the browser loads the given object.
See also put_onload
HRESULT put_onerror(
VARIANT v
);
Sets the inline script associated with the onerror event for an INPUT type=image element. An onerror event occurs when the loading of a document or image causes an error.
See also get_onerror
HRESULT get_onerror(
VARIANT *p
);
Retrieves the inline script associated with the onerror event for an INPUT type=image element. An onerror event occurs when the loading of a document or image causes an error.
See also put_onerror
HRESULT put_onabort(
VARIANT v
);
Sets the inline script associated with the onabort event for an INPUT type=image element. An onabort event occurs when the loading of a document or image causes an error.
See also get_onabort
HRESULT get_onabort(
VARIANT *p
);
Retrieves the inline script associated with the onabort event for an INPUT type=image element. An onabort event occurs when the loading of a document or image causes an error.
See also put_onabort
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.