Page 1 of 1

Windows 8 Select List - loading and refreshing with JS

Posted: Wed Nov 06, 2013 4:13 pm
by Andy Parker

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.


Windows 8 Select List - loading and refreshing with JS

Posted: Wed Nov 06, 2013 5:27 pm
by Kateryna Grynko

Hi Andy,

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


Windows 8 Select List - loading and refreshing with JS

Posted: Wed Nov 06, 2013 5:51 pm
by Andy Parker

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.


Windows 8 Select List - loading and refreshing with JS

Posted: Wed Nov 06, 2013 8:28 pm
by Kateryna Grynko

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


Windows 8 Select List - loading and refreshing with JS

Posted: Wed Nov 06, 2013 8:32 pm
by Andy Parker

Once again you save the day, many thanks!