Solved

"top.document.location" question

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery form 9 39
href return to normal window 5 28
Any Way to rotate banner ads from Commission Junction? 2 36
Add - in a loop to first and last element. 6 36
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…

756 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