--- Tony Bowden <[EMAIL PROTECTED]> wrote:
> On Tue, Jan 27, 2004 at 10:37:48AM -0500, Potozniak, Andrew wrote:
> > To make a long story short I can not get access to the source of
> the bottom
> > frame through JavaScript because of an access denied error.
>
> This is a security feature in most browsers -
Andrew,
Hate to say it, but Tony's right. I've run into this before and the
problem is not insurmountable, but it means that you have to have your
app running on a server.
Instead of loading the page directly into the lower frame, you'll want
the lower frame to point to a Perl script that loads the page for you.
Imagine something like this:
use LWP::Simple;
use CGI ':standard';
my $url = param('url'); # and untaint it
my $page = get($url); # you might need the cookies, too
# hand-wave
# rewrite all of the links to point to this script
# hand-wave
print header, $page;
With this, you can serve JavaScript and the "outside" pages from the
same server, but it's much tougher than it looks. I had written a
Template Toolkit plugin that did much of this for me to allow me to
create framed sites without frames, but it was for my old job and I no
longer have the code :(
I should note that this is also a very error-prone way to do things.
Fixing all of the links is more difficult than it sounds, particularly
if they have "target" attributes.
Cheers,
Ovid
=====
Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm
Ovid http://www.perlmonks.org/index.pl?node_id=17000
Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/