Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

"top.document.location" question

Posted on 2000-03-01
2
Medium Priority
?
327 Views
Last Modified: 2008-03-10
When I use "top.document.location" to find out the url, its giving me "Access Denied" error.

The file which describes the frameset is on a server differnt from the one where the other files are located.
I know you cant use "top.document.." if the files are located on different servers.
But I've also heard that there;'s a way around.Can someone help me here?

Cheers,
0
Comment
Question by:DMM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
nettrom earned 150 total points
ID: 2575585
top.document.location is an old-fashioned way, top.location is the trend nowadays.

you can't access the properties of documents in other frames when those documents reside on other domains, unless you request extended access.  to do that you'll have to either use a signed script in Netscape, or an HTML application in Internet Explorer.

to read more about the cross-frame cross-domain security model, see Netscape's & Microsoft's documentation:

http://developer.netscape.com/docs/manuals/js/client/jsguide/sec.htm
http://msdn.microsoft.com/workshop/author/om/xframe_scripting_security.asp
0
 

Author Comment

by:DMM
ID: 2589330
Hello,

Thanks for the links. I dont want to use SSI and I am not really sure about using the signed script (isnt it too much work for just getting the top.location?). I tried tainting/untainting it did not work either :(

I might have to fall back on signed script if I have to.

Thanks anyway for your help. Please let me know if you find an easier/much simpler way :-)

Cheers,
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question