title: get the data of uploaded file in javascript
body: <p>I want to upload a csv file and process the data inside that file. What is the best method to do so? I prefer not to use php script. I did the following steps. But this method only returns the file name instead of file path.So i didnt get the desired output. </p>
  
  <pre><code>&lt;form id='importPfForm'&gt;
  &lt;input type='file' name='datafile' size='20'&gt;
  &lt;input type='button' value='IMPORT' onclick='importPortfolioFunction()'/&gt;
  &lt;/form&gt;
  
  function importPortfolioFunction( arg ) {
      var f = document.getElementById( 'importPfForm' );
      var fileName= f.datafile.value;   
  }
  </code></pre>
  
  <p>So how can i get the data inside that file?</p>