Friday, January 23, 2009

Check PopUp blocker is enabled or not


FUNCTION IsPopupBlocker() {
   var oWin
= window.OPEN("""testpopupblocker""width=100,height=50,top=5000,left=5000";
  
IF (oWin==NULL || typeof(oWin)=="undefined" {
      
RETURN true;
  
} ELSE {
       oWin.
CLOSE();
      
RETURN false;
  
}
}

IF (IsPopupBlocker()) {
   document.write
("You HAVE A POPUP BLOCKER";
} ELSE {
   document.write
("Popup blocker NOT detected.";
}

No comments: