Solved

XMLHttpRequest open method gives permission denied error

Posted on 2008-06-17
3
1,775 Views
Last Modified: 2008-06-24
The XMLHttpRequest open method gives a permission denied error when I call a page from a different domain. Is there any permanent solution to get around this error?
0
Comment
Question by:baboa
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
rowejd earned 500 total points
Comment Utility
Javascript has a same-origin policy.  You'd have to set up a proxy script if you own both domains/sites.  If you don't own the other site, though, you cannot do this.
0
 
LVL 82

Expert Comment

by:hielo
Comment Utility
This is a security restriction imposed by the browser. The page you are trying to retrieve MUST be from the same domain as the page requesting/retrieving the remote page. However, this restriction does NOT exist on the server. What you need is to have our page send the request to some script on YOUR server and then have the server retrieve the remote page, and lastly, once the content is retrieved, pass it onto your page.
0
 
LVL 12

Expert Comment

by:rowejd
Comment Utility
Does this help baboa?  We'd be glad to help more if not.  I can supply a proxy script if you need one, but as we both stated the same-origin security policy prevents cross domain XML-HTTP (ajax) requests.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now