Javascript to check if popup blocker is active

Asked

Viewed 1,184 times

0

I need to do Javascript for an application that checks if the popup blocker is active. I have the following code:

$(window).ready(function(){
  var Janela = window.open('', '', '');
  if(Janela==null){
      alert('Não Abriu!!!');
  }
});

However, I wanted something that did not open a tab to make this check, because every time I trigger this method, if you have released the popup, will open a new tab for the user.

  • I went to do some research to see if it was possible to check without actually opening a popup, and it didn’t seem very plausible. Take a look here: http://stackoverflow.com/questions/2914/how-can-i-detect-if-a-browser-is-blocking-a-popup

  • It’s really... I’m also not finding anything that makes it possible to check without opening a popup. :(

  • As so far I could not... For the time being, a stopgap measure was to do: Window.Blur(); Window.close();

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.