javascript - PopUp Blocker code detection not working -
I have started a popup blocker in FF and Chrome. I have a piece of code to check the popup:
function checkpop () {var myTest = window.open ("about: blank", "", "directories = no, Height = 1, width = 1, menubar = no, resizable = no, scrollbar = no, position = no, title bar etc = no, top = 0, location = no "); Var popupsblock = ''; If (! MyTest) {popUpsBlocked = true; } Else {popUpsBlocked = false; } Return popups off; }
The page's work is "OK" but when I'm using it with Hyper Link Onclick, it does not work, a popup is being opened.
& lt; A onclick = "checkPopUp ()" href = "#" & gt; Test & lt; / A & gt;
Browsers allow popups during "click" event loops in different user controls Browsers have different configuration options, but the default behavior is usually that a "click" is considered to be user willingly to request functionality from a page.
Comments
Post a Comment