var xhr = new XMLHttpRequest();
xhr.open("GET", "data.txt", true);
xhr.send(null);
xhr.onreadystatechange = function () {
if (xhr.readyState != 4) return;
var countries = xhr.responseText.split("\n"),
html = "";
for (var i = 0; i < countries.length; i++)
html += "<option>" + countries[i] + "</option>";
alert(html);
};