»
EnglishFrenchVietnamese

Print - Popup Blocker Detection - JavaScriptBank.com

Full version: jsB@nk » Snippet » Popup Blocker Detection
URL: http://www.javascriptbank.com/popup-blocker-detection.html

Popup Blocker Detection © JavaScriptBank.comUse this JavaScript snippet to detect if the client browser is using a popup blocker. If a one is detected, the script can then perform a different action. The sample uses an alert box to inform the user whether a popup blocker is present or not.

Full version: jsB@nk » Snippet » Popup Blocker Detection
URL: http://www.javascriptbank.com/popup-blocker-detection.html



JavaScript
<script language="javascript">// Created by: Casey Ryan :: http://www.ebooger.comfunction detectPopupBlocker() {  var myTest = window.open("about:blank","","directories=no,height=100,width=100,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");  if (!myTest) {    alert("A popup blocker was detected.");  } else {    myTest.close();    alert("No popup blocker was detected.");  }}window.onload = detectPopupBlocker;</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->