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 8555523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:08:30+00:00 2026-06-11T15:08:30+00:00

I have a callback function that changes window.location.href = url; however, this callback is

  • 0

I have a callback function that changes

window.location.href = url;

however, this callback is invoked after checking whether an image exists in a different page (and different domain).
My problem is that IE9 won’t let me do the following:

        $(testImage)
            .bind("load readystatechange", function (e) {
                if (this.complete || (this.readyState === 'complete' && e.type === 'readystatechange')) {
                    callbackFunction(true);
                }
            })
            .bind("error abort", function () {
                abort();
            })
            .attr("src", testUrl);

IE9 WILL however allow me to do this:

callbackFunction(true);

but as I want to wait and see that my image exists, I need the above to work. (I don’t want to change IE settings) Of course, it all works just fine in Chrome.

Anyone got any ideas?

Edit: I think I should clarify: “when I say ie9 wont let me do..” I mean that ie9 executes the callback BUT the code inside (changing url) don’t work.

  • 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-11T15:08:31+00:00Added an answer on June 11, 2026 at 3:08 pm

    IE also supports the load event on images, you don’t have to explicitly check the .readyState property unless you have another reason you didn’t mention.

    So it should absolutely be enough to go like

    $( testImage ).on('load', function( e ) {
        callbackFunction( true );
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a callback function that checks my login details are correct - If
I have a function that I use as a callback for a custom event:
I have a member function in a class that has a callback, but the
I want to have one callback function after actions are done, I'm trying something
I have this static callback function in MyClass, and I try to call another
I have a jQuery callback function. In that function I want it to change
I have an object called ValueBox that I created like this: function ValueBox(params) {
I have a list of callback functions that I need to invoke when an
I have a jQuery plugin I am trying to add a callback function for.
I have a new button in my GUI here is its callback: function ptlNew_ClickedCallback(hObject,

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.