Working With iFrames in the WebBrowser Control
Hey everyone!
So, I'm trying to make a spiffy little program that lets you search for flash games, and it will automatically display the flash game within the program. (by writing document text to a webbrowser control) Unfortunately, the site I use to get the games from uses iFrames from Custom Google Search to house the search results. I know how to deal with frames in a webbrowser (WebBrowser1.document.window.frames("frame name here").document.so on and so forth), however it seems as though iFrames are different. When I try
Code:
WebBrowser1.document.window.frames("googleSearchFrame")
, it doesn't recognize that it's there. Same thing if I replace the name with the index of the frame - it's not there. Using
Code:
WebBrowser1.document.window.frames.count
, it shows that there is 1 frame on the page. So why can I not access it?
Here's an example web page. I'm just wanting to be able to access all of the links (gEBTN) in the frame. Any help would be appreciated! Thanks!
http://www.englishbanana.com/search-...oons&sa=Search
Re: Working With iFrames in the WebBrowser Control
can you not access it by index? .Frames(0)?
Re: Working With iFrames in the WebBrowser Control
Nope, I've already tried that :( It says that the number should be something between 0 and -1 when I try that, even if I put 0 it still gives me that error.
Re: Working With iFrames in the WebBrowser Control
Still looking for help on this! Thanks!
Re: Working With iFrames in the WebBrowser Control
the example link you posted doesn't have iframes ( atleast not looking from firefox ) it uses javascript for the googleSearchFrame, so no matter how much you try searching for window.frames on that link it won't find them.
if you navigate to that page & right click & view source you should see what i mean. :)
Re: Working With iFrames in the WebBrowser Control
I'm not sure what you're seeing in FireFox, but when viewing the source in Chrome the search results are placed in an iFrame named "googleSearchFrame". And when I get the count of the frames on the web page using window.frames.count, it displays that there is definitely 1 frame. However, the only problem is that I can't access it for some reason.