Solved

Accessing Frames in a Browser Object...

Posted on 2003-11-23
6
487 Views
Last Modified: 2010-05-01
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

0
Comment
Question by:rdrunner
  • 4
6 Comments
 
LVL 11

Author Comment

by:rdrunner
ID: 9805569
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...
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 500 total points
ID: 9820415
0
 
LVL 11

Author Comment

by:rdrunner
ID: 9821066
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 :)

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 11

Author Comment

by:rdrunner
ID: 10009727
Well looks like this one is dead by now.... Here are your Points...

Happy new Year!
0
 

Expert Comment

by:RomMod
ID: 12019474
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
0
 
LVL 11

Author Comment

by:rdrunner
ID: 12094635
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 :/
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now