Friday, November 21, 2014

How to detect pop up blocker in browser | #Popup







So you need to prevent your site users form blocking the pop up ads .....
Then use the below code .... helped in my case


<script>
var myPopup = window.open("popupcheck.htm", "", "directories=no,height=150,width=150,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
if (!myPopup||typeof(myPopup)=='undefined')
    alert("failed for most browsers");
else {
   myPopup.close();
}
</script>