Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

add method

Adds an OPTION child element to a specified SELECT parent element.

Internet Explorer 8

Syntax


HRESULT retVal = object.add(pElem, pvarBefore);

Parameters

pElem [in]

Type: IHTMLOptionElement

Pointer to the OPTION object to be added.

pvarBefore [in]

Type: VARIANT

Pointer to a VARIANT of type VT_I4 or one of the following types:

VT_DISPATCH

Object to insert before.

VT_UNKNOWN

Object to insert before.

VT_EMPTY

Default. Inserts the object at the end of the collection.

VT_NULL

Default. Same as VT_EMPTY.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The pvarBefore parameter specifies the zero-based index position in the collection or the object before which the element is inserted. If pvarBefore equals VT_EMPTY, VT_NULL, or -1, this method places the element at the end of the collection.

See also

add Method

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.