Home | History | Annotate | Download | only in enterprise
      1 <!doctype html>
      2 <html lang="en">
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Popup Status</title>
      6 <script type="text/javascript">
      7 var pageReady = false;
      8 
      9 function onLoad() {
     10   pageReady = true;
     11   isPopupBlocked();
     12 }
     13 
     14 function isPopupBlocked() {
     15   var popup_window = window.open(null, "", "width=100,height=100");
     16   try {
     17     popup_window.close();
     18     document.getElementById('status').innerHTML += 'Allowed.';
     19     return false;
     20   }
     21   catch (e) {
     22     document.getElementById('status').innerHTML += 'Blocked.';
     23     return true;
     24   }
     25 }
     26 </script>
     27 </head>
     28 <body onload="onLoad()">
     29 <div id=status>Pop-ups Status: </div>
     30 </body>
     31 </html>
     32