Windows 8 Select List - loading and refreshing with JS
Hi,
I'm trying to fill a select list with data, and refresh the list so that it will be available when the user clicks on the list. At present the code below runs without error but does not populate or refresh the list.
var selectedValue = 'Motorway';
var data = {'Motorway': ['Motorway','M1','M2','M3']};
var dropDown = $('[name=mlist]');
var newData = data[selectedValue];
for(i = 0; i < newData.length; i++) {
dropDown.append('< option value="' + newData + '"' + newData + '< /option ');
}
dropDown.Refresh;
alert("loaded mlist");
I've added a couple of spaces in the dropDown.append line above to get it to display.
Any help would be great thanks,
regards
Andy.