Working in Mozilla but not working under IE

404 views Asked by At

I am using FLotr API to draw charts , and Flotr API is internally using Prototype.js . My Charts are working fine under Mozilla , but if i run charts in IE , its giving me Script Errors .

There is a function inside the Prototype.js file

 function observe(element, eventName, handler) {

    element = $(element);

alert(element);

}

When i put the alert for the element and run with Mozilla it displays as

  1. [object Window]
  2. [object HTMLDocument]
  3. [object HTMLCanvasElement]
  4. [object HTMLCanvasElement]
  5. [object HTMLCanvasElement]**

But when i run with IE7 it displays

  1. [Object]
  2. [Object]
  3. A run time error
  4. object
2

There are 2 answers

0
Frédéric Hamidi On

Internet Explorer 7 does not support the <canvas> element. Thus, the runtime error.

You can use a plug-in to add support for that element, though.

1
alexl On

try to include excanvas into your script tags:

http://excanvas.sourceforge.net/

Hope this helps