"Cross-Origin Resource Sharing issues in Internet Explorer versions 10 and 11 with Status Code

Having trouble with an IE bug that's puzzling me. I'm only focusing on supporting IE 10 and 11, so I thought this code would work just fine.

The issue arises when I make an AJAX request:

$.ajax({
    type: {method},
    url: {url},
    cache: false,
    crossDomain: true,
    data: {data to send},
    success: function (data, textStatus, xhr) {
       ///success code
    },
   error: function (xhr, textStatus, errorThrown) {
       //error code
   }
});

This code functions perfectly in Firefox and Chrome but fails in IE 10 and 11. Wasn't CORS supposed to be fixed in these versions of IE?

Why am I encountering the following error in IE 10 and 11?

{"readyState":0,"status":0,"statusText":"Error: Access is denied.\r\n"}

Answer №1

I had to activate the option 'Access data sources across domains'.

Here are the steps:

  1. Go to Internet Options
  2. Click on the Security Tab
  3. Choose Custom level...
  4. Scroll down until you see Miscellaneous
  5. Locate Access data sources across domains
  6. Set the value to Enable

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Updating a nested object element inside an array in Vuex state with Vue.js does not reflect the changes in the component's DOM

Vuex/store : import Vue from 'vue'; import Vuex from 'vuex'; Vue.use(Vuex); const store = new Vuex.Store({ state: { todos: [ {id: 1, text: 'Wash dishes', done: false}, {id: 2, text: ' ...

Numerous Controllers in AngularApp failing to function properly

One issue I'm encountering is that only one out of the two controllers within my app seems to be registered: var app = angular.module('MyModule', []); app.controller('FruitCtrl', function($scope) { $scope.fruits = ['appl ...

Running jQuery in AngularJS partialsHow can I incorporate jQuery into AngularJS partials?

I'm currently leveraging the power of the Angular UI router to divide my web pages into partial views and load them accordingly. However, I've run into an issue where I can't seem to utilize jQuery within these partial views. My approach inv ...

If the PHP function does not exist in jQuery, then take action

I am currently utilizing a form that activates a PHP function through jQuery in the following manner: jQuery('#subnewtideform').submit(ajaxSubmit_subnewtideform); function ajaxSubmit_subnewtideform(){ var subnewtideform = jQuery(this).seri ...

Leveraging jest for handling glob imports in files

My setup involves using webpack along with the webpack-import-glob-loader to import files utilizing a glob pattern. In one of my files (src/store/resources/module.ts), I have the following line: import '../../modules/resources/providers/**/*.resource. ...

Polymer element created specifically for this project can be seen in the DOM, yet it does not display any content within the

Snippet: <link rel="import" href="../../../../bower_components/polymer/polymer.html"> <link rel="import" href="../../../../bower_components/app-layout/app-drawer-layout/app-drawer-layout.html"> <dom-module id="app-index"> <templa ...

Endless Google Locations Instances

My database entries are being displayed in a table using input fields. I want the Location field for each entry to be automatically completed using Google's API. HTML: <input name="edit_airplane[1][location]" type="text" class="airplane_location" ...

What is the best way to change the CSS style of a class using jQuery?

Struggling to make changes to a specific class style without success. I am aware of the addClass function in jQuery for adding a class, but not sure how to override just the style of a class. Is there a method to override styles directly? ...

Troubleshooting issue with Rails 5.2.3 AJAX request: JSON key-value pairs containing the plus sign are not being received

In my Rails 5.2.3 project, I am attempting to send an AJAX request that includes a JSON representation of a callflow object (the specifics of which are not relevant). This JSON representation is located within a textarea with the id "newCallflowJsonDisplay ...

What is the best way to access the second item using getByRole in React Testing Library when there is no specific name?

I am familiar with using the name option to select the first item here, but how can I go about selecting the second item if it does not have a name identified? -------------------------------------------------- button: Enter "Go": ...

What causes Template.mytemplate.rendered to be triggered twice while attempting to animate real-time updates in Meteor.js?

I'm having trouble understanding the functionality of Meteor.rendered. My goal is to create a live animation effect in Meteor similar to this example question. Essentially, I want an element to blink whenever it's clicked. However, each time an ...

Using AJAX, SQL and PHP to send data to a separate page for processing

This is the code I use to retrieve questions via ajax from a list of questions stored in a SQL database. <form id="reg-form3"> <ul class="nav nav-list primary push-bottom"> <? $db['db_host']="localhost"; ...

The element selected by document.getElementById(...) does not exist

There seems to be a common issue with the <div> statement not being ready in many questions on this subject. However, in my case, the <div> statement is indeed ready. The problem lies with the document.getElementById() functions which are only ...

Utilize fileSystem in an API Route when working with NextJS deployed on Vercel

I am facing an issue with using fileSystem methods like readdirSync on an API Route in NextJS. It functions properly locally but returns a 500 status code when deployed on Vercel. Here is the error message from Vercel's Function Logs: catch Error: EN ...

Python-JavaScript Integration Problem

I'm a beginner when it comes to Javascript, Python, and PHP. In my Javascript program, I have a button that triggers a Python script and displays the returned value on the screen. My goal is to steer clear of using Jquery and Json. Here are the snipp ...

What is the process for triggering an event in a React component and capturing it on a node/express server?

As a beginner in React, I am eager to gain more experience by creating a small Full Stack application with a React Frontend and Express server for the Backend. One of my goals is to develop a button in a React component that triggers a function in the Exp ...

Improving the functionality of a dynamic Mongoose JS application

Hey there, I have a pretty simple question that I couldn't find an answer to on Google. So, I'm experimenting with Mongoose JS and I'm curious about how to update a live application. Let's say I've defined a schema in my node.js ...

Knockout problem: Unable to utilize the 'in' operator for finding 'length'

I encountered an error with my web application that is using Knockout.js Received the error message: "Cannot use 'in' operator to search for 'length'" This is my Code: $(document).ready(function () { AjaxRequest(); }); ...

Setting custom parameters ($npm_config_) for npm scripts on Windows allows for more flexibility and customization in

I'm struggling with passing custom parameters from the command line to npm scripts in my package.json file. Despite researching on various platforms, including Stack Overflow, I haven't found a solution that works for me. Here's what I' ...

Successful Ajax function utilizing the data-id parameter

A problem I'm facing is with my feed page that loads a separate file, feedLikes.php, for each post on the feed. Currently, whenever I like a post, it updates the likes using Ajax but unfortunately returns me to the top of the feed. Here’s the code s ...