Solved

"top.document.location" question

Posted on 2000-03-01
2
311 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
2 Comments
 
LVL 7

Accepted Solution

by:
nettrom earned 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now