Javascript get caller function
snippet in javascript

Javascript get caller function

user7906

function alertTheCallersName(){
    var callingFunctionName=alertTheCallersName.caller.name; //get the callers name here
    alert(callingFunctionName);
}

function someOtherFunction(){
   alertTheCallersName();
}
someOtherFunction();