[thelist] Javascript question

Peter-Paul Koch gassinaumasis at hotmail.com
Mon May 21 10:26:22 CDT 2001


>Hello, I get an error of the type
>"access disallowed from scripts at http://sitea.synapdev.com/tag.htm
>to documents at another domain."

Scripts in pages that come from one web server may not read out certain 
properties (like the location.href) of pages that come from another web 
server.

For more info, see http://www.xs4all.nl/~ppk/js/index.html?framebust.html, 
where I attempt (unsuccesfully) to write a generic frame busting script, a 
script that sees if you are in someone else's frameset and if you are, jumps 
out.

>I wonder if this error comes from my server setup (?) or if it is a
>javascript feature that can be worked around.. ?
>My goal being to get top.location.href  (it should give
>http://siteb.synapdev.com/frameset.htm )

You cannot get top.location.href , it is not allowed. Can't be helped. Maybe 
you can set a variable in the top frame and read it out in the other frames, 
but I wouldn't be surprised if even that is not allowed in certain browsers.

ppk
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the thelist mailing list