IE throwing an invalid argument error when making an AJAX request

I have a strange issue with my ajax request - it works perfectly fine in all browsers except for IE, specifically IE10!

The error message I am encountering in the IE console is as follows:

SCRIPT7002: XMLHttpRequest: Network Error 0x80070057, Invalid argument. 
order

Below is the code snippet of my ajax call:

$('#sn_file').live("change", function(){
    var item = $("#loader"),
    loader = $("<div>", {
        "text" : "Uploading file",
        "class" : "ajaxloader"
    }).appendTo( item ),
    form = $(this).parents('form');

form.ajaxSubmit({
         success: function( responseText, statusText, xhr )
         {
             var result = responseText;
             if( isNaN(result) )
             {
                 $("#left-file-upload").html( result );
                 $("#orderform").fadeIn();
                 loader.remove();
             }
             else
             {
                switch( result )
                {
                    case '1':
                    var msg = "";
                    break;

                    case '2':
                    var msg = "";
                    break;
            case '3':
                    var msg = "";
                    break;

                    case '4':
                    var msg = "";
                    break;


                }

                msg = "<div class=\"err-box\"><p>" + msg + "</p></div>";
                item.html(msg)
            }
         }
     });

});

Answer №1

Dealing with a comparable ajax request issue, I encountered the same problem. Give this a shot and include

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" >

within the "head" segment (ie10 and ie9 are quite similar).

Fingers crossed that this solution proves helpful.

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

Pressing the Like Button triggers the transfer of a specific variable from PHP to jQuery

I have a piece of PHP code that I am using to display all users' posts, each with its own unique 'like' button: $sql = "SELECT * FROM posts"; $result = mysqli_query($con,$sql); while($row=mysqli_fetch_assoc($result)){ $post_content = $ro ...

What is the best way to choose the member variables in this specific data structure?

I have been assigned the task of retrieving the cities from various countries, but I am unsure of the best approach to do so. How can I easily extract city names like: For example, for USA it would be NYC and SFO. I attempted using the code snippet cityD ...

Transmit the bound data (using ng-model) to a custom AngularJS directive

/*I am looking to define the maxDate as vmEndDate*/ app.directive('myDatepicker', function ($parse) { return function (scope, element, attrs, controller) { var ngModel = $parse(attrs.ngModel); alert(element.va ...

Extracting information from JSON and presenting it in a structured table format

I've hit a wall with this JavaScript issue on my website. I'm trying to convert API JSON data into a table, and it's working fine when the data is on separate lines. However, when I introduce nested arrays in the JSON data, everything ends u ...

Dynamic font size that adjusts as you change the window dimensions

Is there a way to adjust the font size in HTML so that when I resize the window, the text size adjusts accordingly? It's like setting a percentage for the text based on the size of the container it is in. Let me provide an example of what I have in m ...

Encountered issue while jasmine mocking angular $http - Error: describe function does not support a done parameter

I am currently working with an angular factory that looks like this: .factory('widgetFactory', ['$http', function($http){ function getWidgets(){ return $http.get('http://example.com/api/widgets/') .then(function(re ...

Enhancing Dataset Quality: Incorporating Failed Results with Apify

We have implemented the Apify Web Scraper actor to execute a URL validation task that retrieves the input URL, the title of the page, and the HTTP response status code. Our testing includes 5 URLs - 4 valid ones and 1 non-existent URL. The successful resul ...

Something seems to be amiss with the validation functionality in jQuery

After creating a simple form with input fields and a button, I added validation to display an error message when clicking the apply button without filling out required values. However, the code is not functioning as intended. Even though error messages are ...

Activate current event on newly added elements

Is it possible to have both blur and keypress(13) trigger the same action on an appended element? I thought using trigger() would work, but it's not. Hopefully, I'm just missing something obvious. $(document).ready (function() { $("#btn").cli ...

Showing the image as a backdrop while scrolling through text

How can I create an effect that continuously displays the image while scrolling text in Internet Explorer without using position: sticky or position: fixed? var sticky = document.querySelector('.sticky-container'); var img = document.querySele ...

Is using .htaccess a reliable method for securing a specific file on the server?

Running a classifieds website comes with its own set of challenges, one being the need for an administrator to have the ability to remove classifieds at their discretion. To address this issue, I have developed a simple function that allows me to specify t ...

Transitioning from left to right, picture smoothly scrolls into view using Way

I've explored various websites and even attempted to decipher a waypoint guide, but unfortunately, I haven't had any success. The scroll function doesn't seem to be working with the code below. (source: ) Any assistance on this matter would ...

Is a pop-up alert necessary for table modifications?

In my user Badges and Achievements table, the default value for a Badge is set to locked. Once a user unlocks a badge, the field value is changed to unlocked. I am looking for a way to notify the user through a popup message when they unlock a new achiev ...

Sending a javascript value to the server using ASP.NET

Hello, I am trying to pass a client-side (JS) value to the server-side (C#) and need some guidance on how to achieve this. Specifically, I have a generated table with images uploaded using JQuery Uploadify. I want to select an image from this table and sen ...

The method .makePerspective() in THREE.Matrix4 has been updated with a new signature. Make sure to refer to the documentation for more information

Attempting to run a functional three.js code using release 119 of three.js (instead of r79) has resulted in an error being thrown by the previously functioning code: THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check ...

Displaying website content within a pop-up dialog box

Currently, I am delving into the world of AJAX calls using jQuery.get() to dynamically load website content onto my HTML page. However, I have some doubts about whether I am utilizing this command correctly. As an example, I am trying to fetch data from a ...

Can you explain the {| ... |} syntax in JavaScript to me?

While reviewing a javascript codebase, I stumbled upon a section of code that appears as follows: export type RouteReducerProps = {| error?: Error, isResolving: boolean, isResolved: boolean, hasFailed: boolean, |}; Upon closer inspection, it seem ...

How can you append an object with a defined key to an array in Vue?

Currently developing a vue-application that includes a component for managing driving licenses. Here is an overview of my data setup: data() { return { custom_licenses: [], basic_licenses: [] } } Within my methods, I have the following l ...

Unable to locate Vue.js $ref reference

I am attempting to dynamically adjust the padding of an element through inline styles, depending on the height of its parent. My approach involves: <div class="stock-rating positive" ref="stockRating"> <div class="stoc ...

Exploring jQuery's AJAX capabilities in handling cross-domain requests and implementing Basic Authentication

I attempted the solutions provided in the suggested duplicate question, but unfortunately, they did not yield the desired outcome. I have been struggling to utilize AJAX to POST data to a remote server's API from a local PC client (testing on Chrome ...