Forum Moderators: open

Message Too Old, No Replies

array name stored in variable

referencing array with name stored in variable

         

babushka

3:36 am on Jul 17, 2008 (gmt 0)

10+ Year Member



Javascript newbie here. I am trying to reference an array with a name stored in a variable. I can't seem to figure it out.

For example, I have a listbox call a function on a change event.

funtion Process(selection){

var lenofsel = selection.length;

}

The variable selection contains the selection value of the listbox and that works correctly. For example, the variable selection would hold the text "test". Now I have a "test" array that I want to reference elements in or get it's length.

selection.length doesn't work.
"selection".length doesn't work.

Any help? Thanks,

babushka

4:08 am on Jul 17, 2008 (gmt 0)

10+ Year Member



oops nevermind, that isn't my problem. I'm not sure what my problem is yet.