I'm using the following code to read a local text file from a local Javascript file, but it isn't working:
var txtFile = new XMLHttpRequest();
txtFile.open('GET', fileLocation, true);
The error I get:
XMLHttpRequest cannot load file:///C:/File.txt. Cross origin requests are only supported for HTTP.
Any ideas?