I have followed the instruction on this page but I'm unable to solve the problem.
Here's my code: When file link is clicked it downloads the f.txt file. But I want to access the data without downloading through the url.
var file = 'https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=hi&dt=t&dt=t&q=hello';
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)
{
var allText = rawFile.responseText;
alert(allText);
}
}
}
rawFile.send(null);
}