title: JavaScript: displaying a file in a text area:
body: <p>I want to display the content of a file in a text area.
  I use this script to do that but when I click in the open button the text doesn't appear:</p>
  
  <pre><code>   function loadFileAsText()
     {
      document.getElementById("textoNormal").scrollTop=0;
      var fileToLoad = document.getElementById("fileToLoad").files[0];
  
      var fileReader = new FileReader();
      fileReader.onload = function(fileLoadedEvent)
      {
          var textFromFileLoaded = fileLoadedEvent.target.result;
          document.getElementById("textoNormal").value =   textFromFileLoaded;
      };
      fileReader.readAsText(fileToLoad, "UTF-8");
      id=1;
      }
  </code></pre>
  
  <p>textoNormal: is the id of my text area</p>