I was trying to write some OO Javascript where I have some code like
function Base() {}
Base.prototype.foo = function(){
..
}
Child.superclass = Base.prototype;
function Child(){}
Child.prototype.foo = function() {
Child.superclass.foo.call(this);
...
}
The foo() function in Child works on some IE JS versions, however I get a javascript error on some javascript versions stating that the "call" property is not defined in the line " Child.superclass.foo.call(this);"
I tried googling but could not find an definite answers as to which JS version the "call" functionality was introduced. Is there a better/alternate way to call a superclasses method?
Also is there a way to tell which JS version is running? The machine where I'm getting the error is also running IE 6, but seems to have an older JS version installed on it.
Thanks,
Sanjiv
[ June 02, 2006: Message edited by: Sanjiv Jivan ]