I am using excanvas to draw graphical shape and below is my code. While calling the .getContext("2d")
method it show the 'undefined'
exception in IE7 and IE8.
JS
var script = document.createElement('script');
script.src = 'http://canvas-text.googlecode.com/svn-history/r48/trunk/excanvas.js';
script.type = 'text/javascript';
var c = document.getElementById("myCanvas");
context = c.getContext("2d");// getContext is undefined
html
<canvas id='myCanvas'></canvas>
What I did wrong.. anyone could help on this please?
Try this