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.i nnerhtml '<--- Here
Next i
End If
End With
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.i
Next i
End If
End With
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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 :)
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 :)
ASKER
Well looks like this one is dead by now.... Here are your Points...
Happy new Year!
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
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
ASKER
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 :/
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 :/
ASKER