Jump to content

Trouble with IE functions


 Share

Go to solution Solved by Danp2,

Recommended Posts

I've been struggling with this for some time now, but I'm trying to figure out how to bind to some objects in a secure web form. Here is a screenshot of the HTML:

10dtfk2.png

and this is my code:

$oIE = _IECreate($URL)
$frame = _IEFrameGetCollection($oIE)
$navframe = _IEGetObjByName($frame,"__nav__")
$test1= _IEFrameGetCollection($navframe)
$test2 = _IEGetObjByName($test1,"auth")

Everything seems fine up until $test2. The @extend value of $test1 is 2, so there are definitely elements in there, but when I try GetObjectBy name or ByID, I always get the return error 7 (no match).

Anyone have any idea what I'm doing wrong here?

Link to comment
Share on other sites

  • Solution

_IEFrameGetCollection returns a collection of objects unless you pass the 2nd parameter indicating the desired instance. Also, don't confuse an element's name with its ID. The highlighted div element has no name, but it's ID is "auth".

Try this:

$oIE = _IECreate($URL) 
$frame = _IEFrameGetCollection($oIE, 1) 
$authdiv = _IEGetObjById($frame,"auth")
Link to comment
Share on other sites

 

_IEFrameGetCollection returns a collection of objects unless you pass the 2nd parameter indicating the desired instance. Also, don't confuse an element's name with its ID. The highlighted div element has no name, but it's ID is "auth".

Try this:

$oIE = _IECreate($URL) 
$frame = _IEFrameGetCollection($oIE, 1) 
$authdiv = _IEGetObjById($frame,"auth")

That did it!! Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...