Is there a way to make a drop-down list that lists all of the textfiles in the same folder as my webpage is in? I only want the textfiles because I have other filetypes in there but while typing this, it makes me wonder if I can read the webpages own file while I am viewing it at the same time and what would happen if I edited it using it and then saved it. That would make it like alive! :o
I want to display the contents of a chosen selected textfile from the menu list into a resizable textarea but all I know is <input type="file"></input>
which is inconvenient and all my searches for a javascript gave me jquery, ajax and php instead.
Do I have to install jquery, ajax and php for them to work on my computer? I'm not hosting this on a server, I'm just running it locally. Like from my own computer.
I have been searching for hours but the closest I can find just javascript is this which seems to need a URL, because I tried with document.getElementById("textarea").value = readfile('test.txt');
but maybe I'm just lacking knowledge and put it in the invalid location or I'm missing something?