File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Exception in opening a connection using AJAX call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Exception in opening a connection using AJAX call" Watch "Exception in opening a connection using AJAX call" New topic
Author

Exception in opening a connection using AJAX call

Rinky Kaur
Greenhorn

Joined: Nov 03, 2008
Posts: 7
when I made a connection on the same server at different port using AJAX call in FireFox browser
xmlHttp=new XMLHttpRequest();
xmlHttp.open("GET", url,true);
I got the exception
[Exception... "Access to restricted URI denied" code: "1012" ....]
I discovered this is for security reasons in Firefox.

Is there a solution to it? ie,Can we MAKE AN A CALL USING AJAX on different domain? HOW?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not. JavaScript has a same domain policy. You must set up a proxy on the server.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in opening a connection using AJAX call