?
Solved

XMLHttpRequest open method gives permission denied error

Posted on 2008-06-17
3
Medium Priority
?
1,791 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
[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
3 Comments
 
LVL 12

Accepted Solution

by:
rowejd earned 2000 total points
ID: 21806062
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
ID: 21807361
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
ID: 21858681
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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