S
Steve Neill
Here's an interesting problem...
I have 2 functions, aFunc() and bFunc(). I call aFunc() passing a call
to bFunc() as a parameter. Function aFunc() executes bFunc(). Function
bFunc() lists the parameter values passed to it.
OK, here's the twist...
I want to add some parameters to bFunc() from inside aFunc(). Can that
be done?
Sorry no prizes, except the satisfaction of the solution
Regards,
Steve
aFunc(function() { bFunc(); } );
function aFunc(f) {
var x = 1;
var y = 2;
// add x, y as parameters to function f()
// ???
// execute the parameter function
f();
}
function bFunc() {
for (var i = 0; i < arguments.length; ++i) {
alert(arguments);
}
}
I have 2 functions, aFunc() and bFunc(). I call aFunc() passing a call
to bFunc() as a parameter. Function aFunc() executes bFunc(). Function
bFunc() lists the parameter values passed to it.
OK, here's the twist...
I want to add some parameters to bFunc() from inside aFunc(). Can that
be done?
Sorry no prizes, except the satisfaction of the solution
Regards,
Steve
aFunc(function() { bFunc(); } );
function aFunc(f) {
var x = 1;
var y = 2;
// add x, y as parameters to function f()
// ???
// execute the parameter function
f();
}
function bFunc() {
for (var i = 0; i < arguments.length; ++i) {
alert(arguments);
}
}