Josiel Denardi6690187
Posts: 0
Joined: Mon Feb 24, 2014 9:23 pm

Populate a Select component via Javascript ou JQuery

I need to make a loop (for) for populate a SELECT component in real time.

What proprities that I will have to use for make this?

In browser in the web page I did:

Code: Select all

         var campo_select = document.getElementById('mecanico'); 
         campo_select.options.length = 0;    
         for (var i = 0; i < jsonData.mecanico.length; i++) { 
             var counter = jsonData.mecanico[i]; 
             campo_select.options[i] = new Option(counter.mecanico_name, counter.mecanico_id); 
         }
Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Populate a Select component via Javascript ou JQuery

Hello Josiel,

Please use the mapping for that like: https://docs.appery.io/docs/appbuilde...

Josiel Denardi6690187
Posts: 0
Joined: Mon Feb 24, 2014 9:23 pm

Populate a Select component via Javascript ou JQuery

Hi,

Don't is rest service result, I will to generate a Select components of the 1950 at current year for user to select the year of the car manufactured.

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

Populate a Select component via Javascript ou JQuery

Hello Josiel,

I am sorry but could you please clarify what exactly you are planning to do? Is it kind of sorting?

Return to “Issues”