Solved

permission denied to get property Location.host

Posted on 2006-10-19
2
668 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
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…

746 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

13 Experts available now in Live!

Get 1:1 Help Now