Re: How to call a website in a frame?

cr <[email protected]> Wed, 25 Apr 2007 00:40:47 -0400
Newsgroups gmane.comp.mozilla.jrex
Message-ID <[email protected]>
Ahh, I see.  Yes, I remember dealing with this before, and it wasn't 
completely obvious how to deal with it at first.  What I did was to use 
the HTMLFrameElement interface to get the "content document" associated 
with the frame.  This is another DOM which you should be able to use as 
usual.

Something like the following should work:

import org.w3c.dom.html2.HTMLFrameElement;
import org.w3c.dom.html2.HTMLIFrameElement;

...

     if (n instanceof HTMLIFrameElement) {
         Document doc = ((HTMLIFrameElement) n).getContentDocument();
         // do something
     } else if (n instanceof HTMLFrameElement) {
         Document doc = ((HTMLFrameElement) n).getContentDocument();
         // do something
     }

Hope that helps.

--Chris

Billy wrote:
> Me again...
> 
> For example I got that part in the index.html:
> 
> <FRAMESET>
>     <FRAME SRC="navigation.html" NAME="aName">
>     ....
> 
> So this is a part of the content of the mainpage. In fact I can not fibd out by
> Jrex what the content of navigation.html is. getChildNodes or anything else is
> not working here: The adress of navigation.html is on the bottom level allready.
> 
> So is there any way to extract the htmls of the frames (they are even shown in
> the browser, so it should...)? And if there is - is there a way to do some
> website calls inside of that frames?
> 
> Best regards
> Billy