title: How do I detect that my pop-up window failed (due to a pop-up blocker)?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2914/how-can-i-detect-if-a-browser-is-blocking-a-popup">How can I detect if a browser is blocking a popup?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to open a new window (onclick) to a page on Facebook (facebook.com/sharer.php).</p>
  
  <p>However, if this fails due to pop up blockage, I want to detect it and change it to a link instead (new tab).</p>
  
  <p>How can I do that?</p>