0

I'm looking for a simple way to read textfiles with hashtags in the name. This is my code:

function readTextFile(file)
{
    var rawFile = new XMLHttpRequest();
    rawFile.open("GET", file, false);
    rawFile.onreadystatechange = function ()
    {
        if(rawFile.readyState === 4)
        {
            if(rawFile.status === 200 || rawFile.status == 0)
                alert(rawFile.responseText);
        }
    }
    rawFile.send(null);
}
var file = "#name.log";
readTextFile(file);
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
NoOne
  • 1
  • A hashtag is a means of indicating that a term, in plain text, should be hyperlinked as a search term (on social media networks). It gets the name because it it uses a hash character to prefix it. Most things that use a hash symbol are not hashtags. – Quentin Apr 04 '18 at 21:06
  • thanks for the quick answer to my foolish question. It works now – NoOne Apr 04 '18 at 21:25

0 Answers0