PopUp Blocker code detection not working.

Posted by httpftp21 on Stack Overflow See other posts from Stack Overflow or by httpftp21
Published on 2010-06-15T12:27:32Z Indexed on 2010/06/15 12:32 UTC
Read the original article Hit count: 199

Filed under:
|
|

I have turned on PopUp blocker in FF and Chrome. I have a piece of code to check PopUp is working as: [Code]

function checkPopUp()
{
  var myTest = window.open("about:blank","","directories=no,height=1,width=1,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
  var popUpsBlocked = '';
  if (!myTest) {
    popUpsBlocked = true;    
  } else {
    popUpsBlocked = false; 
  }
  return popUpsBlocked;   
}

[/Code]

its working fine "onload" of the page. But when i am using it with hyper link onclick, its not working a popup is getting opened.

[code] Test [/code]

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about popup