Imported from my original Blogspot archive (2007–2010). Posts are preserved as originally written, including language, formatting, and mistakes.
The following javascript codes doesn't work in IE when loading a second time:
var i = new Image();
i.src = "image address";
i.onload = function() {
/* function */
}Solved by Codetrinis:
This problem is because the second time that loads the image is read from the cache, therefore is loaded complete before reaching img.onload. The solution is as follows:
var i = new Image();
i.onload = function() {
/* function */
}
i.src = "image address"