You can use an http request to do it and get the file as a static page.
function exec_req(url)
{
objAJAX = false;
if (window.XMLHttpRequest)
{
try
{
objAJAX = new XMLHttpRequest();
if (objAJAX.overrideMimeType) objAJAX.overrideMimeType('text/xml');
}
catch(e)
{
objAJAX = false;
}
}
else if (window.ActiveXObject)
{
try
{
objAJAX = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
objAJAX = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
objAJAX = false;
}
}
}
if (objAJAX)
{
objAJAX.onreadystatechange = myCallback;
}
objAJAX.open("GET", url, true);
objAJAX.send();
}
}
function myCallback() {
if(objAJAX.readyState == 4 && objAJAX.status == 200) {
var myText = objAJAX.responseText
alert(myText)
}
else {alert('error while reading this file');}
}
just call the function exec_req('bla/your_file _link.txt'), and when the file'll be read the function myCallback will be invoked, and the text you are looking for will be available as a local var in that function. This is async. I am not sure it will work locally if you don't run a localhost (Cross origin requests are only supported for HTTP).