My goal: i need to read txt file using fso - activeX then separate text by ; and put each separated word in select - option. so far i got this but aint working
<script>
function readAll() {
var fso = new AcitveXObject("Scripting.FileSystemObject");
var txtFile = fso.OpenTextFile("kategorije.txt", 1, false, 0);
var fText = txtFile.ReadAll();
txtFile.Close();
}
var array = fText.split(";");
var sel = document.getElementById("dropdown2");
for (var i = 0; i < dropdown2.length; i++) {
var opt = document.createElement("option");
opt.innerHTML = fText[i];
opt.value = fText[i];
sel.appendChild[opt];
}
</script>
my code works now and it look like this