Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

append option to select ajax javascript

$.ajax({
  url : "file_url",
  type:'POST',
  dataType: 'json',
  success: function(response) {
    $.each(response,function(key, value){
      $("#select_id").append('<option value=' + key + '>' + value + '</option>');
    });
  }
});
 
PREVIOUS NEXT
Tagged: #append #option #select #ajax #javascript
ADD COMMENT
Topic
Name
9+7 =