//Populate combobox through map
function populateCombobox(data,elementId){
var options = "<option value=-1>Select..</option>";
$.each(data, function(key, value) {
options += "<option value="+key+">"+value+"</option>";
});
$(elementId+' option').remove();
$(elementId).append(options);
}
function populateCombobox(data,elementId){
var options = "<option value=-1>Select..</option>";
$.each(data, function(key, value) {
options += "<option value="+key+">"+value+"</option>";
});
$(elementId+' option').remove();
$(elementId).append(options);
}
No comments:
Post a Comment