Well, I was going to write a rant, explaining how as far as I could tell, there was no way to make sure an image was downloaded, or degrade gracefully if it wasn’t–within an event like onclick. But, it all boils down to the fact that there is no
setTimeout (Mozilla docs, IE docs). The problem with
setTimeout is that after calling it, your event handling code merrily continues to execute, and that your
setTimeout callback will probably not finish before the event code is finished.
I did not try the modal window approach, or the java applet (which seems a bit like using a sledgehammer to hit a mosquito) outlined here, but I’m not sure that either of those is really production ready (I’m not alone).