[Proto-Scripty] Re: Building a string for an array reference

2010-04-14 Thread thegdog
T.J., Thanks so much for the reply. I completely blanked on that way of referencing it, and appreciate you filling me in on it. That worked perfectly for me. On Apr 11, 12:16 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, You can reference a property of an object using a string key

[Proto-Scripty] Re: Building a string for an array reference

2010-04-11 Thread T.J. Crowder
Hi, You can reference a property of an object using a string key and square brackets, so this: var itemsToShow = myOptions. + sel; should be: var itemsToShow = myOptions[sel]; ...assuming that `sel` contains a string like myOptions_group1, as it appears to from the if/else structure