title: Downloading a Dynamic CSV in Internet Explorer
body: <p>The following code works in both FireFox and Chrome, but not IE. Essentially, I have a JSON object which gets converted into an array and then to a csv format, when I click the button in FF or Chrome the file gets downloaded or the <em>Save As</em> window opens, but in IE a new tab opens up. In a perfect world IE would not exists, but in the real world we have to make it work, lol.</p>
  
  <pre><code>$("#csvbtn").click(function(e){
      e.preventDefault();
      var  json_obj= JSON.parse(result);
      var csv = JSON2CSV(json_obj);
      window.open("data:text/csv;charset=utf-8," + escape(csv));
  });
  </code></pre>
  
  <p>BTW, I am using IE 11 in windows 8 to test this, if that makes a difference.</p>
  
  <p>Thanks all!</p>