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

  • Home
  • SEARCH
  • 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 3315316
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:20:09+00:00 2026-05-17T22:20:09+00:00

has anyone encountered a problem where you register a LoadHandler on the image, and

  • 0

has anyone encountered a problem where you register a LoadHandler on the image, and when the image is loaded the LoadHandler doesn’t get called sometimes? Is there some voodoo to make it work? Like some ridiculous order of initialization? This is driving me nuts.

The code works on Firefox, Chrome, IE6 and IE7. The image is attached to the DOM (I know LoadHandler won’t get called if the image is not attached).

Edit

I have reduce the larger code to the following snippet.

private void loadNext() {
    if (count < urlList.size())
        Image displayImage = new Image();
        displayImage.addLoadHandler(new ImageLoadHandler());
        displayImage.addErrorHandler(new ImageLoadError());
        mainPanel.add(displayImage);
        displayImage.setUrl(urlList.get(count));
        return;
    }
}

private class ImageLoadHandler implements LoadHandler {
    public void onLoad(LoadEvent event) {
        count ++;
        Log.TRACE("Success");
        loadNext();
    }
}

private class ImageLoadError implements ErrorHandler {
    public void onError(ErrorEvent event) {
        Log.ALERT("Error");
    }
}

So basically this loads images one by one once the previous one has finished loading. The problem that occurs is the first image shows up as red x in IE8 and an error is caught. Now, if I right click on the image and click “show picture” it shows up, and triggers something such that the onLoad event is fired and the rest of the images load without errors! Now all of a sudden onLoad event works, all the other images which are same type are no longer an error.

the urlList is a list of urls to the images. The URL does not contain an extension for image type. The URLs go to a servlet which generate an image. I have taken care to set the proper Content-type headers (image/jpeg) in the response.

Furthermore, if I right click on the broken image, IE8 shows that it doesn’t know its type. If I copy the URL, paste it in the address bar, IE loads the image just fine on its own. Now it seems to know the type when it’s not in tags.

Very frustrating.

Thanks.

  • 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-17T22:20:10+00:00Added an answer on May 17, 2026 at 10:20 pm

    It turned out that this is a known GWT Bug.

    Updating to GWT 2.1 should solve the problem.

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

Sidebar

Related Questions

Has anyone encountered the following problem: I have IIS7 running on my computer. On
Uhm I'm not sure if anyone has encountered this problem a brief description is
I was wondering if anyone has a good solution to a problem I've encountered
Has anyone encountered this oddity? I'm checking for the existence of a number of
Has anyone encountered such a beastie? I'm thinking about a tree-like display, database, login
Has anyone encountered this error using SQL Server 2005 and Data access application blocks
Has anyone looked at Yahoo's ASTRA ? It's fairly nifty, but I had some
Has anyone tried installing SQL Server 2008 Developer on a machine that already has
Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?
Has anyone run into this error message before when using a timer on an

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.