T
Tuxedo
Is it possible to create a dynamically named function by a parameter and
then run the created function within the block of the initial function by
parameter reference, without literally typing the name of the
parameter-named function within the initial function block? Something like:
function main_function(param){
function ??? (){ // create a function named by the parameter value
d = document.title;
alert(d);
}
return ???() // run sub_function by a parameter reference
}
main_function('sub_function') // name the function, e.g. 'sub_function'
Surely the construct would not look close to the above...
Thanks for any ideas!
Tuxedo
then run the created function within the block of the initial function by
parameter reference, without literally typing the name of the
parameter-named function within the initial function block? Something like:
function main_function(param){
function ??? (){ // create a function named by the parameter value
d = document.title;
alert(d);
}
return ???() // run sub_function by a parameter reference
}
main_function('sub_function') // name the function, e.g. 'sub_function'
Surely the construct would not look close to the above...
Thanks for any ideas!
Tuxedo