I am trying to use a drop down box to update some data. what I would like to do is use a function to return the variable ds,ds1 depending on what the user selects. For example. if they select ds from the dropdown box I want the function to return the actual var ds and not the ds value, since I want to reference the variable ds in another bit of code depending on the selection. Hope this makes sense.
Thanks for your help,
<div >
<select id="dropdown" onchange="updateData()">
<option value="ds">ds</option>
<option value="ds1">ds1</option>
</select>
</div>
var ds = [[{x:0,y:72}],[{x:0,y:28}]];
var ds1 = [[{x:0,y:2}],[{x:0,y:50}]];
function myVar() {
return (dropdown.value);} //I want this to be the variable ds i.e. var ds //[[{x:0,y:72}], [{x:0,y:28}]]; not the value.