title: Why won't the the image drop into the canvas?
body: <p>I've got a canvas and an image. I want to be able to drag and drop the image into the canvas. Get nothing in the console that e is not defined or anything.. anybody got a clue?</p>
  
  <p>Thanks for the help now and all for all my other posts! :)</p>
  
  <p>javascript:</p>
  
  <pre><code>function first(){
      dragedPic = document.getElementById('firstPic');
      dragedPic.addEventListener("dragstart", startDrag, false);
      canvas = document.getElementById('Canvas');
      canvas.addEventListener("dragenter", function(e){e.preventDefault();}, false);
      canvas.addEventListener("dragover", function(e){e.preventDefault();}, false);
      canvas.addEventListener("drop", dropped, false);
  }
  function startDrag(e){
      var code = '&lt;img src="FärgadePapper.png"&gt;';
      e.dataTransfer.setData('Text', code);
  }
  function dropped(e){
      e.preventDefault();
      canvas.innerHTML = e.dataTransfer.getData('Text');
  }
  window.addEventListener("load", first, false);
  </code></pre>