title: Fetching image from url with javascript
body: <p><br>
  I am trying to show an image on my page from a different url.<br></p>
  
  <pre><code>&lt;body&gt;
  &lt;div id="container"&gt;
      &lt;br /&gt;
  
      &lt;canvas width="500px" height="375px" id="canvas"&gt;
      &lt;/canvas&gt;
      &lt;img src="http://yinoneliraz-001-site1.smarterasp.net/MyPicture.png" /&gt;
  
  &lt;/div&gt;
  &lt;script&gt;
  
      var img = new Image;
      img.src = "http://yinoneliraz-001-site1.smarterasp.net/MyPicture.png";
  
      var timer = setInterval(function () { MyTimer() }, 200);
      function MyTimer() {
          var ctx = canvas.getContext('2d');
          ctx.drawImage(img, 0, 0,500,675);
          img = new Image;
          img.src = "http://yinoneliraz-001-site1.smarterasp.net/MyPicture.png";
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>The image on the other site is being saved every 1.5 seconds.<br>
  The result is that I cant view the image.<br>
  Any ideas why?
  <br><br>
  Thanks!</p>