I've hit a real problem and just can't figure it out. Appreciate any comments
1. I want to load an image in an image object using the .src property.
2. If that image does not exist, I want to replace it with a known good one.
The code below emulates my more complicated script and behaves with exactly the same problem. It tries to load ="./images/wrong.gif", which does not exist and the onerror event handler therefore tries to load "./images/blankimage.gif", which does exist.
The problem is that the browser only ever tries to render ./images/wrong.gif, EVEN THOUGH I KNOW each of the event handlers have fired because of the alerts - once for onerror trying to load ./images/wrong.gif and once for onload trying to successfully load./images/blankimage.gif