Help me figure it out, using jquery, insert it into the select option, but in the source code there is no option. In the browser option are added and displayed. And since they are not in the source code, the form flies away empty when sent to the server. How much do I understand correctly that without a reboot is not enough? that is, when the DOM is already lined up then no longer change it? But how can I solve the problem?
Code itself
$.get('/getcitys?city_id=' + city_id, function(data){ $.each(data, function(index, subcatObj){ $('#citys').append('<option value="'+subcatObj.id+'">'+ subcatObj.city +'</option>'); }); });