I have a number of functions names saet_dim1(), saet_dim2() ... saet_dim10(). How can I cal this function depending on a FOR?
I have tried this:
but with no luckCode:for (j=1;j<11;j++){
saet_dim' +j '();
}
Printable View
I have a number of functions names saet_dim1(), saet_dim2() ... saet_dim10(). How can I cal this function depending on a FOR?
I have tried this:
but with no luckCode:for (j=1;j<11;j++){
saet_dim' +j '();
}
cant you create one function and pass a parameter to it?
Then in the function update Dim1? Unless this is not what you're trying to achieve...Code:for (j=1;j<11;j++){
saet_dim(j);
}
Hi Punkie
Of course you're right, that would be the best solution, but the functions I need, are not build up like that, and they are very complicated to change. So I need to do it the other way, somehow like you showed me some time ago for elements:
Code:document.test.elements('test'+i).value=5;
try this
the eval function has some security and speed issues thatCode:for(i=0;i<2;i++)
eval('saet_dim'+i+'()');
you might want to check out first