Hi,
is there a way to get the name of the calling object of a method?
function MyFunction()
{
this.SayCallersName = _SayCallersName;
}
function _SayCallersName()
{
alert("how to get 'oTest' as output here?");
}
var oTest = new MyFunction();
oTest.SayCallersName();
What I want as an output is the name of the object I have created
without passing it to the constructor.
So I do not want oTest = new MyFunction("oTest") or something like
that.
Is this possible in JScript?
Just curious...please do not start a thread about "why are you doing it
that way?" - It's for testing purposes...just playing around with the
JScript language and trying out weird stuff. :-)
René