Quote Originally Posted by midgetracer View Post
I am using the code that 'rnd me' submitted, but am having issues hard inputting the address into it. I'm building a situational awareness page at work that runs off of our local drive. Currently we just iframe a few .txt files from the Space Weather Prediction Center, but I would like to readastext them and write them so I could modify the text with css. I do not need to use the input=file as the address never changes, but I'm having a heck of time getting to work... any thoughts?
you can only use this code on local files selected via <input type=file>.
it will NOT work for URLs.

try using the free YQL webservice to convert the page to JSON-packed base64, and unpack the data on the client.
this solution needs window.atob(), which comes with at least chrome and ff.
for other browsers, download a base64 DECODE routine, and name the function "atob". that should make it work everywhere.

  var fileContent=(atob(data.query.results.url.split(",")[1]));
  alert(  fileContent  );

function addScript(u){ var sc2=document.createElement('script'); sc2.src=u;  document.getElementsByTagName('*')[1].appendChild(sc2) }

see the YQL console for making new URLs to use with addScript if you want to grab other pages.