Occasionally, one or more img's contained in the html do not display in IE or FF. FF shows a failed image icon but IE shows nothing at all where the image should go. If I hard code the exact same html into the div it works fine. Debugging shows the img element where it should be with the correct src. It has happens with 135 byte png's as well as 200k jpg's. I have worked around this in IE by preloading the images just prior to assigning the html string to the div's innerHTML.
But this workaround has no effect in FF. It appears to be somehow related to timing since any delay introduced by debugging often causes them to display correctly. Does anyone have any suggestions as to the cause and/or solution to this problem.