> > Thanks for your tests; I'll take another look when I get some > > time. > > It's a race condition: the image is preloaded before the HTMLEmbed > control has a chance to render the new content. Therefore the > browser can't find the image with the given ID yet. > > I need to listen for loading of the placeholder image and check for > image preloading at that point.
Actually, this was wrong. The problem is that in IE I can't determine the size of the image from the node if it isn't loaded yet. In XML terms there are width and height attributes which may specify a non-native size for the image. But as the image isn't loaded yet, IE in its wisdom decides that it will return a width and height of 0 (even if accessed through getAttribute()). Therefore I've used the outerHTML property in IE to get the original HTML string for the image. If it's present, I use it; otherwise I use the width/height of the image element which gives the scaled size in Firefox (note that naturalHeight and naturalWidth give the actual image size). So it's all working now. I tested it with an 18MB radar image of mars which is a jpg 12032 x 6912 pixels, scaled to 100 pixels high! Hugh ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel