basica
asked on
Getting HTML from particular frame in webbrowser
I'm able to get the body html from the webbrowser by using this command:
t1.text = WebBrowser1.Document.body. innerhtml
but if the webpage uses frames how do I specify that I want the source from a particular frame?
t1.text = WebBrowser1.Document.body.
but if the webpage uses frames how do I specify that I want the source from a particular frame?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Actually, ignore that last comment, that's because there was no page in the webbrowser. But now when there is a page in there I get this error:
[438] object doesn't support this property or method, on this line...
For Each Fr In objFr.frames
[438] object doesn't support this property or method, on this line...
For Each Fr In objFr.frames
ASKER
Thanks.. I sorted it out.. I managed to get the html of the frame by doing this:
Text1.Text =
WebBrowser1.Document.
frames(x).Document.body.in nerhtml
Text1.Text =
WebBrowser1.Document.
frames(x).Document.body.in
Try to change code :
If objFr.Frames.length > 0 then
For each Fr in objFr.Frames
getframe Fr.Document
next
end if
If objFr.Frames.length > 0 then
For each Fr in objFr.Frames
getframe Fr.Document
next
end if
ASKER
For Each Fr In objFr.Frames