Greetings! I am working on an application in htaEdit where I require to read a text file line by line and insert each line into a select dropdown. Here is the code for the select dropdown:
<select onchange="disableCategory();" style="width:220px;margin-left:80px;" id="dropdown2" name="">
<option value="" selected="default" disabled>Select...</option>
</select>
I am uncertain how to write JavaScript to achieve this. However, I have successfully tested uploading a local file and processed it using ActiveX with the following code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.OpenTextFile("sample.txt", 1, true);
var row = s.ReadLine();
alert(row);
My text file contains about 10 words like: AA BB CC .. and so on.