title: Displaying POST AJAX Response in new window
body: <p>I send POST data through ajax using jQuery and it returns the binary data of a PDF file.</p>
  
  <p>I'd like to do something with this data. Either by providing a link to download, or opening it a new tab/window.</p>
  
  <p>I know sending a user to a website and using GET variables would be easier but there is a lot of data that gets sent through and it needs to be post.</p>
  
  <p>Is there a way I can take the data that I retrieve and let a user download / see it somehow?</p>
  
  <pre><code>$("#export_pdf").click(function()
  {
      var data_serialize = "v1=blah&amp;var2=again&amp;var3=more_info",
      url = "/actions/export-pdf";
      $.ajax({ 
          type: "POST",
          url: url,
          data: data_serialize,
          success: function(data)
          {   
              // data = PDF binary
              // I want to do something with this
          },error: function(data) { alert("error"); }
      });
  });
  </code></pre>