S
sfeher
Hi All,
Is there a way to preserve the arguments across functions?
I have:
<script>
function myFirstFunction()
{
// arguments[0] = 'param1'
// arguments[1] = 'param2'
//...
notMyFunction(arguments);
}
function notMyFunction()
{
// arguments[0][0] = 'param1'
// arguments[0][1] = 'param2'
//...
mySecondFunction(arguments);
}
function mySecondFunction(params)
{
// params[0][0] = 'param1'
// params[0][1] = 'param2'
//...
}
myFirstFunction('param1', 'param2', 'param3');
</script>
What I'd like to receive is params[1] instead of params[0][1] since
params[1] never holds anything.
I cannot change notMyFunction() so my question is: is there a way of
calling notMyFunction() from myFirstFunction() and pass the arguments
expanded ?! So far my guess is that I can't do this but it would be
nice if there was something like it.
Regards,
Sebastian
Is there a way to preserve the arguments across functions?
I have:
<script>
function myFirstFunction()
{
// arguments[0] = 'param1'
// arguments[1] = 'param2'
//...
notMyFunction(arguments);
}
function notMyFunction()
{
// arguments[0][0] = 'param1'
// arguments[0][1] = 'param2'
//...
mySecondFunction(arguments);
}
function mySecondFunction(params)
{
// params[0][0] = 'param1'
// params[0][1] = 'param2'
//...
}
myFirstFunction('param1', 'param2', 'param3');
</script>
What I'd like to receive is params[1] instead of params[0][1] since
params[1] never holds anything.
I cannot change notMyFunction() so my question is: is there a way of
calling notMyFunction() from myFirstFunction() and pass the arguments
expanded ?! So far my guess is that I can't do this but it would be
nice if there was something like it.
Regards,
Sebastian