Solved

"top.document.location" question

Posted on 2000-03-01
2
308 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

744 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

11 Experts available now in Live!

Get 1:1 Help Now