Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Windows 8 Select List - loading and refreshing with JS

Hi Andy,

Please post a public link and tell us where we can see the issue.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Windows 8 Select List - loading and refreshing with JS

Hi Katya,

app shared with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
name: MCW_win8

To load the Select Object (called mlist), please click the button on the UI named "Pro Version".

many thanks.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Windows 8 Select List - loading and refreshing with JS

Andy,

Appery.io for Windows 8 works different (for example, all the components are available by ID, not by name) that's why you should replaceprevar dropDown = $('[name=mlist]');/prewithprevar dropDown = $('#mlist');/pre

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Windows 8 Select List - loading and refreshing with JS

Once again you save the day, many thanks!

Return to “Issues”