• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

method.call(..) throws "object doesn't support this property" on some browsers

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a call in prototype
__method.call(object, event || window.event);

which works fine on several machines which have IE 6 however on a couple of them (also running IE 6) it throws the exception "Object doesn't support this property or method".

Any idea why I'm seeing this error? The "call(..)" function is part of JS, right? Or is it possible I have an older JS engine.

Thanks,
Sanjiv
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Call is not supported in IE 5 and under.

I am guessing that your object reference is not there when you are trying to make a call.

How to debug? Well it will be tough. You need to examine the object to see if it actually contains one.

if(typeof yourObjectRef != "object")alert("AHHHH");

Eric
 
Sanjiv Jivan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This code is in the prototype library (prototype.js) and works fine in many IE 6 browsers. The very same page just breaks on a couple of machines where I suspect the JS engine maybe older although the browser version is IE 6. Is there a quick way to determine the JS engine version.

I ran my code through a JS debugger and (typeof __method) returns "function".

Thanks,
Sanjiv
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic