How does your array look like?

Do you mean like:
var selected_value = $("#dropdown").val();
var myVar = myArray[selected_value];

???

On Mar 24, 3:30 pm, macsig <sigbac...@gmail.com> wrote:
> Hello guys,
>
> I have a drop-down menu with 2 values ("a" and "b") and I have on my
> script 2 arrays ("a" and "b").
>
> Is there a way to select an array according to the drop-down value. I
> mean if I store in a variable the selected value
>
> var selected_value = $("#dropdown").val();
>
> is there a way to refer to the array with the same name of the value
> stored in selected_value?
>
> Thanks and have a nice day!

Reply via email to