Solved

permission denied to get property Location.host

Posted on 2006-10-19
2
676 Views
Last Modified: 2010-07-27
I have a page that has a third party blogging page included as a frame. That third party page includes some js fro mmy site (different domains). I get a "permission denied to get property Location.host" when in the frameset from the blogging third party page. Why and is there anyway to get around this? I can't change the js that is looking for the location.host.
0
Comment
Question by:894359
2 Comments
 

Author Comment

by:894359
ID: 17769401
This is what I found so far;

 Security restrictions prevent a script in one frame from accessing location object information in another frame if the document in the second frame does not come from the same domain (and the same server, unless the document.domain properties of the two documents are set to match) as the document with the nosy script. This prevents a rogue script from monitoring navigation in another frame to external web sites. In Navigator 4 and later, you can overcome the security restriction with the help of signed scripts, but the user still has to give explicit permission for a script to access location object information outside the script's domain.
0
 
LVL 12

Accepted Solution

by:
netsmithcentral earned 500 total points
ID: 17770354
Unfortuanately, what you've found is mostly true.  Without using server side scripting (which would let you pull the entire script for transplanting into your page), or putting a copy of the scripts on your blog page's domain, you can't access them.  It's a security feature, and a pretty good one at that.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Make options hidden and show just option that is on 1 29
Google Analytics setup 5 50
forgetful about js objects 8 46
Button on Table, name table1 not working 4 20
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

856 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