title: window.open popup getting blocked during click event
body: <p>What I ultimately need to do is run an <code>$.ajax()</code> call and then after that is run, open a new window.</p>
  
  <p>A use clicks on a "Preview" button that saves their current form then opens a new window that shows a preview of the item with the data that was just saved.</p>
  
  <p>But as-is, the <code>window.open</code> function gets blocked by popup blockers.</p>
  
  <p>Here's the basic parts of my code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;a href="/surveys/185/preview" class="preview" target="_blank"&gt;Preview&lt;/a&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>$('.preview').live('click', function(event){
    save_survey($(this).attr('href'));
    event.preventDefault();
  });
  
  function save_survey(url) {
    $.ajax({
      type: "POST",
      url: form_url,
      dataType: 'json',
      data: form_data,
      success: function(data) {
        window.open(url, '_blank');
      }
    });
  }
  </code></pre>