Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

"top.document.location" question

Posted on 2000-03-01
2
Medium Priority
?
328 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 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…
Suggested Courses

877 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