I need to be able to cancel an image load after a set period of time, and it needs to subsequently call the onError action.
What it will do:
Use window.stop to stop download
if(window.stop !== undefined) { window.stop(); } else if(document.execCommand !== undefined) { document.execCommand("Stop", false); }
To change image source
var img = document.getElementBYId("yourImageID"); img.setAttribute("src","newSource.gif");