This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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: 15385
    
    6
You can not. JavaScript has a same domain policy. You must set up a proxy on the server.

Eric
 
Have you checked out Aspose?
 
subject: Exception in opening a connection using AJAX call
 
It's not a secret anymore!