I have a text file(VMS.txt) containing data A,B,C,D
So i just want this comma delimited text as content of dropdown list , since i am not so familier with javascript , can anyone kindly help me with that .
So here is my code (Index.php)
<script>
$(document).ready(function(){
$(document).on('click', '.add', function(){
var html = '';
html += '<tr>';
html += '<td><input type="text" name="VMName[]" class="form-control Vmname" /></td>';
html += '<td><select name="Type[]" id="VMName" class="form-control type"><option value="base" >Select Type</option>';
html +='</select>';
html += '<td><button type="button" name="remove" class="btn btn-danger btn-sm remove"><span class="glyphicon glyphicon-minus"></span></button></td></tr>';
$('#item_table').append(html);
});
$(document).on('click', '.remove', function(){
$(this).closest('tr').remove();
});
});
</script>
So here when i click Add button it shows Type as dropdown list , i want A ,B, C as content of that drop down list , i tried everything , i just want someones help . Kindly help me with this .