javascript - Working in Mozilla but not working under IE -


i using flotr api draw charts , , flotr api internally using prototype.js . charts working fine under mozilla , if run charts in ie , giving me script errors .

there function inside prototype.js file

 function observe(element, eventname, handler) {      element = $(element);  alert(element);  } 

when put alert element , run mozilla displays as

  1. [object window]
  2. [object htmldocument]
  3. [object htmlcanvaselement]
  4. [object htmlcanvaselement]
  5. [object htmlcanvaselement]**

but when run ie7 displays

  1. [object]
  2. [object]
  3. a run time error
  4. object

internet explorer 7 does not support <canvas> element. thus, runtime error.

you can use plug-in add support element, though.


Comments