Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:11:40+00:00 2026-06-14T05:11:40+00:00

I’ve got code working in the latest Chrome and Firefox. IE9 however hates me

  • 0

I’ve got code working in the latest Chrome and Firefox.
IE9 however hates me (and I feel the same).

The specific error I’m getting is:
Object doesn't support property or method 'done'

The code in question:

app.$.ajax({
                url: app.baseUrl + "Geos",
                contentType: "application/json",
                dataType: "json"
            }).done(function (data) {
                app.controls.ddlGeos.html('');

                for (var i = 0; i < data.d.length; i++) {
                    var geo = data.d[i];
                    var option = $(document.createElement("option"));

                    option.attr('value', geo.code);
                    option.html(geo.name);

                    app.controls.ddlGeos.append(option);
                };
            }).fail(function (xhr, status) {
                console.log("Error retrieving Geo list", xhr, status);
            }).always(function (data, status, xhr) {
                app.controls.ddlGeos.parent().find('#geo_ajax_image').remove();
                app.setSelectedValues(app.controls.ddlGeos, app.controls.hdnGeo.val());
            });

Something that makes this slightly abnormal is that I am manually loading the latest version of jQuery 1.8.2) like this:

// The following code allows us to run jQuery 1.8.2 independantly of the main jQuery
    if (!jq) {
        var script = document.createElement("script");
        script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js';
        script.onload = script.onreadystatechange = function () {
            window.jq18 = jQuery.noConflict(true);
            app.init(window.jq18);
        };
        document.body.appendChild(script);
    } else {
        app.init(jq);
    }

The reason I am doing this is because I’m writing against a very old web app and I can’t overwrite window.$ so I’m sending my app the newest jQuery version.
However, I have done some console logging and the correct version of jQuery IS being loaded by the time the ajax call has been hit. app.$().jquery outputs "1.8.2"

EDIT
Ok, I think I know part of the problem. I’m doing similar code in 2 different ASP.Net UserControls (think encapsulated web page). They BOTH are loading jQuery 1.8.2 this way because neither can be sure the other exists. It seems like Firefox and Chrome handle this ok, but IE is somehow causing my “onreadystatechange” event to fire twice (and somehow one of them is happening without the proper version of jquery).
Is there anything I can do to modify that jquery loading code to ensure it only happens once? I’m calling it like this:

(function (jq) {
    // All my "app" code here
    app = {
        init : function($) {
            app.$ = $ || window.$;
            // Other code
        }
    };

    if (!jq) {
        var script = document.createElement("script");
        script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js';
        script.onload = script.onreadystatechange = function () {
            window.jq18 = jQuery.noConflict(true);
            app.init(window.jq18);
        };
        document.body.appendChild(script);
    } else {
        app.init(jq);
    }
})(window.jq18);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:11:41+00:00Added an answer on June 14, 2026 at 5:11 am

    IE9 seems to have readyStates such as "uninitialized", "loading" and "complete". The transitions between these seem to fire onreadystatechange in IE. The onload is eventually also fied, so you’re initializing everything several times. I’m not sure how that causes the weird return value of $.ajax, but apparently removing it fixes it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
i got an object with contents of html markup in it, for example: string
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.