Function Reference


_IEFrameGetObjByName

Returns an object reference to a Frame or iFrame by name

#include <IE.au3>
_IEFrameGetObjByName ( ByRef $oObject, $sName )

Parameters

$oObject Object variable of an InternetExplorer.Application, Window or Frame object
$sName Name of the Frame you wish to match

Return Value

Success: an object variable pointing to the Window object in a Frame, @extended = Frame count.
Failure: sets the @error flag to non-zero.
@error: 3 ($_IEStatus_InvalidDataType) - Invalid Data Type
4 ($_IEStatus_InvalidObjectType) - Invalid Object Type
7 ($_IEStatus_NoMatch) - No Match
@extended: Contains invalid parameter number

Remarks

The object returned by this function is a window object which allows access to the document contained within.
You may also want to access the frame or iframe tag and its properties - to do this, use _IETagNameGetCollection().

Related

_IEFrameGetCollection

Example

; Open iFrame example, get a reference to the iFrame
; with a name of "iFrameTwo" and replace its body HTML

#include <IE.au3>

Local $oIE = _IE_Example("iframe")
Local $oFrame = _IEFrameGetObjByName($oIE, "iFrameTwo")
_IEBodyWriteHTML($oFrame, "Hello <b><font color=red>iFrame!</font></b>")
_IELoadWait($oFrame)