D
D Elkins
Here is my situation:
I have several arrays ... let's say ... Bob1_1, Bob1_2, etc.
Each array has several elements ... element 1 is the one I am
interested in.
Example:
Bob1_1=new Array("Element 0","NewWin=window.open('thispage.html')");
Bob1_2=new Array("Element 0","NewWin=window.open('thatpage.html')");
I am tracking which array is currently being used through a variable
.... say, 'CurrentArray'.
I want to do something like this:
eval ('Bob'+CurrentArray+'[1]') but the statement does nothing. Upon
checking the type using typeof it reports back a string which makes
sense.
Doing this works fine: eval(Bob1_2[1]) but I need to build that
statement dynamically.
Any ideas ????
I have several arrays ... let's say ... Bob1_1, Bob1_2, etc.
Each array has several elements ... element 1 is the one I am
interested in.
Example:
Bob1_1=new Array("Element 0","NewWin=window.open('thispage.html')");
Bob1_2=new Array("Element 0","NewWin=window.open('thatpage.html')");
I am tracking which array is currently being used through a variable
.... say, 'CurrentArray'.
I want to do something like this:
eval ('Bob'+CurrentArray+'[1]') but the statement does nothing. Upon
checking the type using typeof it reports back a string which makes
sense.
Doing this works fine: eval(Bob1_2[1]) but I need to build that
statement dynamically.
Any ideas ????