Use setTimeout to call itself after a short pause.
javascript code:
function setImageUrl()
{
$('#ImageTest')
.error(function() {
alert('Handler for .error() called.')
setTimeout( setImageUrl , 300 )
})
.attr("src", $imageURL);
}
setImageUrl()
I guess this will work in IE7 since the image is doing the cross-domain stuff, not the script, so there's no security issues.
Hmmm, might also need to set the src to a safe value and then back to the test one for it to trigger a change. (Not sure on that.)
EDITED: 3 Sep 2011 13:29 by BOUGHTONP