I want to open a new window/tab with POST Data, but it's not working : <p>Here is one of the calls that is generated via PHP:</p>

<pre><code>                    &lt;script&gt;
                      var copyrecipient = [];
                      var customhintcopy = [];
                      copyrecipient.push('customer');
                      copyrecipient.push('healthinsurance');
                      customhintcopy.push('4');
                      customhintcopy.push('6');
                      $.ajax({
                      type: "POST",
                      url: "./content/pdf-view-bill.php",
                      data: {
                         bills: '6',
                         copyrecipient:copyrecipient,
                         customhintcopy:customhintcopy,
                         additionaltextcopy: '',
                         copycoveringnotes: '5',
                         documentationcopy: '1',
                         original: '1'
                      }
                      success: function(data){
                          var win = window.open();
                          win.document.write(data);
                      }
                    })&lt;/script&gt;
</code></pre>

<p>The console throws "Uncaught SyntaxError: Unexpected identifier" on the "success-line", and i have no idea why.
What i want is a new window or tab to open, that gets sent the data i have defined above.
Anyone can help me? I'm pretty new to Ajax...</p>
