Yes, but they MUST both come from the same site, that is have the protocol,
host and port
or location.host, location.protocol and location.port must all be equal in
both frames.
I'm not sure if you can get the whole contents, but you should be able to
get the contents of named tags,

If the page you want to read has this:
<HTML ID="TheWholeThing">

Then use something like this:
var txt = parent.otherFrame.TheWholeThing.innerHTML;

You should at the very least be able read the entire contents of the BODY
tag like this:
var txt = parent.otherFrame.document.body.innerHTML;

You may need to play with it a bit to find out exactly how much of the other
frame's source you can get.


----- Original Message -----
From: "Dave Shelley" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 12:26
Subject: Witango-Talk: Javascript Question


> Is it possible to read the entire contents of one frame from within
another
> frame? Something like:
>  var txt = parent.otherFrame.document.innerHTML;
>
> I have my doubts as this would open a huge security hole, but I thought
I'd
> ask anyway.
>
> Dave Shelley
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to