IHTMLFramesCollection2

IHTMLFramesCollection2


This is a zero-based collection of all FRAME elements if the document contains the FRAMESET element. If the document contains the BODY element, this is a collection of all IFRAME elements in the document. In either case, the order of frames is determined by the HTML source.

This collection is indexed first by name, then by ID. If duplicate names are found, a collection of those named items is returned. The resulting collection can only be referenced by ordinal position.

This is a collection of FRAME tags.

IHTMLFramesCollection2 Methods
item   get_length  

IHTMLFramesCollection2::item

HRESULT item(
    VARIANT *pvarIndex,
    VARIANT *pvarResult
);

Retrieves an element or a collection from the frames collection. The index determines which action to take.

pvarIndex
Address of a variable specifying the element or collection to retrieve. If this parameter is a number, the method returns the element in the collection at the given position, where the first element has value 0, the second has 1, and so on. If this parameter is a string, the method returns a collection of elements, where the value of the name or id property for each element is equal to the string.
pvarResult
Address of a variable that receives an element object or a collection of element objects if successful, or null otherwise.

IHTMLFramesCollection2::get_length

HRESULT get_length(
    long *p
);

Retrieves the number of elements in the frames collection.

p
Address of a variable that receives the number of elements.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.