title: How to cancel an image load after a period of time?
body: <p>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.</p>
  
  <p>What it will do:</p>
  
  <h2>Attempt to retrieve the resource. src="https://www.site.com/cgi-bin/pullimg.cgi?user=+encodeURI(document.cookie) , which pulls a user-specific resource. The cookies are stored in a protected folder.</h2>
  
  <h2>If it can't in 1 second (1000 ms), then execute onError.</h2>
  
  <p>onError changes the images src attribute, then reloads the img. (Changes to different uri, like mirror.site.com/err.png)</p>
  
  <p>Also, it can be a javascript function (newImage).</p>
  
  <p>Sorry for not supplying existing code; I <em>can</em> code in multiple langs though.</p>