SaRiD
Programmer
- Apr 19, 2003
- 45
Hi
I'm trying to use the setInterval function. I seem to be having trouble passing an array through to the function.
Lets say my array is
var my_array = Array("red", "green", "blue");
if I use the following:
setInterval("my_function(my_array)", 50)
It errors saying "my_array is undefined"
If I put quotes around my_array it then passes through the contents of "my_array" as a string and not an array like I wanted.
Any thoughts???
I'm trying to use the setInterval function. I seem to be having trouble passing an array through to the function.
Lets say my array is
var my_array = Array("red", "green", "blue");
if I use the following:
setInterval("my_function(my_array)", 50)
It errors saying "my_array is undefined"
If I put quotes around my_array it then passes through the contents of "my_array" as a string and not an array like I wanted.
Any thoughts???