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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:43:18+00:00 2026-05-25T03:43:18+00:00

I understand that doing what I’m attempting is very bad programming form (relying on

  • 0

I understand that doing what I’m attempting is very bad programming form (relying on javascript’s detection of active images for crucial purposes). However, I have some code that greatly depends on this detection.

Here’s an example of what I’m attempting: http://jsfiddle.net/5BPJj/1/

This works well in all browsers except IE9. As I understand it, IE9’s $(window).load is unique in that the event sometimes fires before all images finish loading. Thus, I’m experiencing a race condition–sometimes when images are enabled, they are not yet loaded and so treated as disabled.

I grabbed the image detection code from here: http://talideon.com/weblog/2005/02/detecting-broken-images-js.cfm

If anybody can get this working in IE9 (and IE7+ et al), or knows of a more reliable image detection method, I’d be most most appreciated.

Please note that I need to know not just when images are enabled (a simple load event), but specifically when they are disabled.

Thank you so much.

=======

EDIT: To disable images in IE, I’m using Tools > Internet Options > Advanced and unchecking “Show pictures”

  • 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-05-25T03:43:19+00:00Added an answer on May 25, 2026 at 3:43 am

    If you’re able to use jQuery you could fire the broken image detection function when the DOM has loaded, the ready() method “does not get triggered until all assets such as images have been completely received” (from the documentation page).

    Something like this would do the trick I think:

    jQuery(document).ready(function() {
      for (var i = 0; i < document.images.length; i++) {
        if (!IsImageOk(document.images[i])) {
          document.images[i].style.visibility = "hidden";
        }
      }
    });
    

    Hope that helps

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

Sidebar

Related Questions

I understand that doing minimization in integer programming is a very complex problem. But
I understand that it is not possible to tell what the user is doing
I understand that with javascript you can select the contents of a textbox with
I understand that it's possible (and I have done it) to return javascript and
Where it says :topic, what is that doing? From what I can understand :topic
I understand that reinterpret_cast is dangerous, I'm just doing this to test it. I
I understand that some countries have laws regarding website accessibility. In general, what are
I understand that there are several ways to blend XNA and WPF within the
I understand that they are both supposed to be small, but what are the
I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. Major is

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.