I followed W3 Schools tutorials and ended up writing following code that doesn't do the work of copying the image inside canvas element. Canvas is blank...
<img id="image" src="assets/images/bw.jpg" width="200" height="276" alt="" />
<canvas id="canvas" width="220" height="286"></canvas>
and Javascript follows:
var c=document.getElementById("canvas");
var ctx=c.getContext("2d");
var img = document.getElementById("image");
ctx.drawImage(img,0,0);
Why this simple example is not working???