locked
img.onerror always raised even when loaded correctly

    Question

  • I'm using a common solution to hiding broken images in my app.

    <img class="postthumbnail" onerror="this.style.display = 'none';" ... />

    Unfortunately in a WinJS app this results in all of my thumbnails being hidden because the onerror event fires for all images even when loaded successfully. 

    Any suggestions?



    weichhold.com

    Thursday, July 12, 2012 6:55 PM

All replies

  • Hi

    Can you give me a simple repro project?

    Actually,to troubleshoot this issue, we really need the source code to reproduce the problem.It is not necessary that you send out the complete source of yourproject. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it. then we can find the issue more conveniently and provide further suggestions for you.

    Friday, July 13, 2012 11:43 AM
  • What is the error you get when the image successfully loads?

    Jeff Sanders (MSFT)

    Friday, July 13, 2012 6:51 PM
    Moderator