-
Oct 16th, 2003, 10:39 PM
#1
Thread Starter
New Member
Webbrowser Access Problem
G'day all
I'm trying to use the webbrowser control to traverse a website and fill in some forms automatically.
the page displays properly in the WB control on screen and you can right click and view source for each frame
The majority of frames are handled fine,
however trying to access one particular frame (the most important one of course!) generates an "Access Denied" error
(80070005).
I can't get any infomation out of it or enter any information into it.
Does any one have any ideas why this might be happening, and/or know how to get around it?
any and all suggestions appreciated.
-
Oct 24th, 2003, 06:45 AM
#2
Fanatic Member
are you sure you are using the correct index if you are using a collection ?
for example if you want to get item 0 but it does not exist because the collection starts counting with 1.
-
Oct 27th, 2003, 07:03 PM
#3
Thread Starter
New Member
Thanks,
but unfortunatley I am sure
looping through all the frames the first three will work
the forth will fail with this error the fifth and onwards will work
It's very strange. I suspect they are protecting it in some way
but cant see anything different with the way the that particular frame is coded
-Shade
-
Oct 10th, 2005, 10:32 PM
#4
Hyperactive Member
Re: Webbrowser Access Problem
Has anyone found a solution to this problem yet? I've been searching for DAYS and WEEKS for a solution, but it doesn't seem to be found.
I specifically tried the example given by MICROSOFT themselfes in
http://support.microsoft.com/default...;EN-US;Q297950
but it will STILL GIVE ME an "Access Denied" error...
does anyone know how to access frame contents? (Obviously parsing the frameset then navigating to that fram manually is not an option)
Signed, Rodik (rodik@hehe.com)
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
-
Oct 10th, 2005, 10:44 PM
#5
Re: Webbrowser Access Problem
Can you post the site? Have you tried using DOM to parse? There have been a lot of examples. You may want to send a PM to TheVader, with a link to this thread. He has helped many people with parsing with DOM. I have posted a few examples also, but have to know if you are using an ASP or Java page.
-
Oct 10th, 2005, 11:11 PM
#6
Hyperactive Member
Re: Webbrowser Access Problem
I Also want to be able to manipulate frame content (as described in http://www.openicon.com/FramesHowTo.html ) but VB wont let me!! Or rather.. the WebBrowser control wont let me.
Have you tried the example by microsoft (in my previous post) ? It didn't work with an "Access Denied" error. Maybe it's just my computer? I dunno..
It's not a specific site, just any site at all containing frames..
Signed, Rodik (rodik@hehe.com)
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
-
Oct 11th, 2005, 07:13 PM
#7
Hyperactive Member
Re: Webbrowser Access Problem
Signed, Rodik (rodik@hehe.com)
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
-
Oct 11th, 2005, 07:25 PM
#8
Re: Webbrowser Access Problem
Don't post your email address in the forums, or at least separate it with an AT instead of a @. You will get spammed as bots search the pages.
I've PM'd theVader for you. Hopefully VBMail is working.
-
Oct 12th, 2005, 09:20 AM
#9
Fanatic Member
Re: Webbrowser Access Problem
Well, the example posted by Microsoft doesn't do much, except for some in-site element parsing. How have you managed to access the other frames? Do you know how to use the frames collection?
Anyway, I'm using this sub to fill a collection with all frame documents:
VB Code:
Private Sub GetFrames()
'Purpose: searches all frames in the document(s) and adds them to colDocuments
Dim i As Integer, j As Integer
j = 1
Set colDocuments = New Collection
colDocuments.Add webPage.Document
Do While j < colDocuments.Count + 1
For i = 0 To colDocuments.Item(j).frames.Length - 1
colDocuments.Add colDocuments.Item(j).frames.Item(i).Document
Next i
j = j + 1
Loop
End Sub
colDocuments can then be used as any other HTMLDocument (such as WebBrowser1.Document). I've used this code in an application that browses many sites with frames, and I've never got an 'Access Denied' error.
Can you post some of your code?
Author for Visual Basic Web Magazine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|