I am trying to populate a selct list. The data is already there (i.e. forget json/ajax for now)
To test, I added a load event with:
code
var foo= '1,text1|2,text2|3,text3|4,text4';
var sx = foo.split('|');
var options = Appery ('presentation_open_slots');
for (var idx = 0; idx < sx.length; idx++) {
var sx = sx[idx].split(',');
var val_option = sx[0];
var text_option = sx[1];
Code: Select all
options.append('<option value="'+ val_option + '">'+ text_option+ '</option>'); }
options.selectmenu('refresh');
/code
This JS is pretty basic.... but it's a test.
I get a select list with text1 and undefined... still looking