Link to home
Start Free TrialLog in
Avatar of rdrunner
rdrunner

asked on

Accessing Frames in a Browser Object...

I have some Problems accessing Frames in a Browser Object..


This Code produces a RT-Error and wont let me do as i wish...

The error Produced is : 80070005 Access denied
    Dim i As Long
    If (WebBrowser1.Document Is Nothing) Then Exit Sub
    With WebBrowser1.Document
        If .frames.length > 0 Then
            For i = 0 To .frames.length - 1
                Debug.Print "FRAME " & i
                Debug.Print "========"
                Debug.Print .frames(i).Document.body.innerhtml '<--- Here
            Next i
        End If
    End With

Avatar of rdrunner
rdrunner

ASKER

P.s.: This is a cross domain Problem... The Browser contains 1 Frame and the browser displays 1 URL and the Frame is used to navigate to the other URL with the Data attached the the URLs...
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ahhhh well...

There is one sentence i hate about the MSDN.....

---
STATUS
This behavior is by design....
---

Well i found a work around (messy but working) I just redirect the top frame to the url of the inner frame and i am able to mess with the page like i desire... Messy but working :) And since its only for personal use i can live with it... Anyway... Thanks for the link to the Article... If noone comes up with a better solution ill accept it when a cleanup guy shows up :)

Well looks like this one is dead by now.... Here are your Points...

Happy new Year!
rdrunner, It appears that you have devised a workaround... However, the exact syntax as to how it was accomplished
was not posted... could you please elaborate for the benefit of others reviewing this question from the PAQ database?

Thank you,
RomMod
Community Support Moderator
I really would not give this workaround to any client...

But for the record..

I keep a 2nd browser open (invisible) which only holds the contens of the frame i am interested in. This 2nd browser is updated everytime i recieve a navigate event from the frame i am watching. Since i am only interested in the information in that frame this workaround works. If i want to update or control the contens then i would be stuck with this. Like i said its functional but not elegant :/