?
Solved

permission denied to get property Location.host

Posted on 2006-10-19
2
Medium Priority
?
692 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
[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
 

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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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

777 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