File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes cross domain 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 "cross domain" Watch "cross domain" New topic

cross domain

fairoz khan

Joined: Aug 03, 2012
Posts: 9
Hi Friends,

My local:
i am calling one webservice url from normall html page. In my local its working fine without any IE settings.(environment is windows xp).But in my system Miscellaneous is disable in IE.

other machine:
when i am calling same url from sharepoint(using same code) i am facing error. (access-control-allow-origin domain).To reslove error i did below IE settings.(environment is window 7)

settings:Click the “Security” tab. Click the “Internet” icon, then click the “Custom Level” button. Scroll down to the “Miscellaneous”(enable it) section of the list in the Settings pane.

then its working in sharepoint.

my code:
$(document).ready(function() {

var url="";

//cache: true,
dataType: "json",
type: "GET",
url: url,
success: function(jsonp) {



But i dont want to do manually settings in IE.

is it possible to Enable to Miscellaneous from javascript or jquery or i want to do any changes in my code.

Thanks in advance.

Fairoz p.

Rob Crowther
Ranch Hand

Joined: Nov 06, 2012
Posts: 297

Fix this from the server side by adding the access-control-allow-origin header mentioned in the error message.

Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
I agree. Here's the link:
subject: cross domain
It's not a secret anymore!