CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
can't get a .location?



Mar 20, 2001, 4:57 AM

Post #1 of 2 (1204 views)
can't get a .location? Can't Post

I have found that for Security reasons (not quite sure why?) I am not allowed to get the .location value from a frame that contains a page served from another server. I REALLY need to do this.

Script running in Frame1 needs to capture the URL of the page currently in Frame2 nomatter where it came from.

My script works fine as long as the page in Frame2 came from my server. Otherwise I get a "Permission Denied" error. I think I have traced this down to some wonderful thing called "tainting"??

I am simply using frame2.current.location to try and capture the url.

Thanks for any help on this. I am really stuck.


Mar 22, 2001, 12:05 PM

Post #2 of 2 (1194 views)
Re: can't get a .location? [In reply to] Can't Post

First off, your talking about javascript and not perl. Maby you should try checking a java site such as

Second, it is impossible to get the URL from .location if the page in .location is not from the same server, unless the user has disabled or messed with his security settings. This is because you could design a javascript to "SPY" on the user and see which pages they visits throughout a whole browser session.

However you can compare or modify the .location value.


A simple frame break script.

if(top.location != location){top.location.href = location.href;}

if the top.location exists and is not the same as location.href then set top.location to location.href


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives