title: Reading a CSV file using jQuery
body: <p>I'm using IE8 with jQuery 1.9.1. I want the user to select a csv file. The contents of the file should be displayed in the alert. So far, I have been able to do this:</p>
  
  <pre><code>function getCsv(filepath) {
      $.ajax({
          type: "GET",
          url: filepath,
          dataType: "text",
          success: function(data) {
              alert(data);
          },
          error: function(xhr, ajaxOptions, thrownError) {
              alert("Status: " + xhr.status + "     Error: " + thrownError);
          }
      });
  };
  
  $("#upload").click(function() {
      var fname = $("#filename").val();
      fname = fname.replace(/\\/g, "/");
      fname = "file:///" + fname;
      getCsv(fname);
  });
  </code></pre>
  
  <p>This works great when I open the html file directly(by double clicking the file). But when I deploy this on a server(IIS Server) it gives the error alert.</p>
  
  <p>Also i have used <code>jQuery.support.cors = true</code> to avoid problems with CORS.</p>