Click to See Complete Forum and Search --> : location-property in frames


stim
11-02-2003, 04:21 PM
Hey,
Imagine: You have a page devided into frames. Now you would like to know the location of the site you're viewing in one frame in the other.

Usually you could use the location property of document.

But it seems that this function is restricted or so when viewing a site outside your domain.

Anyone tricks for that?
Thanks.

gil davis
11-02-2003, 04:47 PM
No tricks. It is a security risk to allow client-side script to investigate information from a different domain.

stim
11-02-2003, 04:52 PM
So what you're saying is that I can never know the adres my frame is viewing? Not even with another language. :(

No options like iframe of some?
None?

Damn (sorry)

stim
11-02-2003, 05:10 PM
Also, can i not alter the url of the frame?
Say from any location i want a button that redirects it to google. This also doesn't work?

gil davis
11-02-2003, 05:26 PM
I have never tried it. My understanding of the security rules leads me to believe that you should not be able to alter any property of a window or frame once it becomes "foreign" by loading a page from a different domain. You will be able to change the file that is in the window/frame using a html link with a target that specifies the name of the window/frame, but not with script.