Popups are sometimes good. Sometimes we want to show our data on popups or want to give some functionality which creates popups. But it becomes a tedious job when user’s popups are blocked by default by their browsers. In such situations we can alert users to enable their popups by unblocking them for your website.
If window.open() returned false that means popup blocker of user’s browser is active. So here we will ask user to enable it and if window.open() returned true that means browser is allowing to open popups, so as soon as we will open he url (www.google.com here) in a popup window we will close it.
Here is complete code: