title: Open new Tab or Window with POST [PHP]
body: <p><strong>This is the situation:</strong> I have 2 files, <strong>reportCaller.php</strong> and <strong>report.php</strong>. From the reportCaller.php, the user is going to press a button with the method "onclick", this will call the function that is going to do the ajax/post stuff (this is with what im having problems), report.php is going to catch some parameters by POST and has to be opened on a new Tab or Window, this is going to display a report. (Note: <em>May be not important, but im using HTML2PDF</em>).</p>
  
  <p>reportCaller (HTML):</p>
  
  <pre><code>&lt;input type="button" onclick="generateReport()"&gt;
  </code></pre>
  
  <p>reportCaller (JS):</p>
  
  <pre><code>function generateReport(){
  
    var id = '¡I must reach the report FILE!';
    //I tried a couple stuff, but didnt work, this is one:
       $.ajax({
          type: "POST",
          url: "report.php",
          data: {id:id},
          cache: false,
          success: function (html) {
              myWindow = window.open(encodeURIComponent(true),
                  "_blank");
              myWindow.focus();
      });
  
  }
  </code></pre>
  
  <p>report:</p>
  
  <pre><code>$id = $_POST['id'];
  //This file (report.php) must catch $_POST, will not help if i only open the file in a new Tab/Window
  </code></pre>
  
  <p>Thanks for reading.</p>