Popup Blocker Detection using Javascript
-
hi all, greetings. I've to detect the pop up blocker status using java script. I'm using the following code, which is taken from a site. But it is not working.can any one of you give me the soltuion for solve this issue.
function detectPopupBlocker() { var test=window.open("","","directories=no,width=100,height=100,menubar=no,resizable=no,scorllbars=no,status=no,titlebar=no,top=0,location=no"); if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); } }
Thanks in Advance babu -
hi all, greetings. I've to detect the pop up blocker status using java script. I'm using the following code, which is taken from a site. But it is not working.can any one of you give me the soltuion for solve this issue.
function detectPopupBlocker() { var test=window.open("","","directories=no,width=100,height=100,menubar=no,resizable=no,scorllbars=no,status=no,titlebar=no,top=0,location=no"); if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); } }
Thanks in Advance babu -
What goes wrong and in which browser?
Brad Australian - Captain See Sharp on "Religion" any half intelligent person can come to the conclusion that pink unicorns do not exist.
-
hi all, greetings. I've to detect the pop up blocker status using java script. I'm using the following code, which is taken from a site. But it is not working.can any one of you give me the soltuion for solve this issue.
function detectPopupBlocker() { var test=window.open("","","directories=no,width=100,height=100,menubar=no,resizable=no,scorllbars=no,status=no,titlebar=no,top=0,location=no"); if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); } }
Thanks in Advance babuTry the following script it might work.
function 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("Please allow popups for this web site"); } else { myTest.close(); return; } }
What a curious mind needs to discover knowledge is noting else than a pin-hole.
-
hi all, greetings. I've to detect the pop up blocker status using java script. I'm using the following code, which is taken from a site. But it is not working.can any one of you give me the soltuion for solve this issue.
function detectPopupBlocker() { var test=window.open("","","directories=no,width=100,height=100,menubar=no,resizable=no,scorllbars=no,status=no,titlebar=no,top=0,location=no"); if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); } }
Thanks in Advance babuYou'll also want to remove the marked line, as the window does't exist when that code executes you can't call the close method... if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); }
-
Did you remember to call the function onload?
Brad Australian - Captain See Sharp on "Religion" any half intelligent person can come to the conclusion that pink unicorns do not exist.
-
Try the following script it might work.
function 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("Please allow popups for this web site"); } else { myTest.close(); return; } }
What a curious mind needs to discover knowledge is noting else than a pin-hole.
-
You'll also want to remove the marked line, as the window does't exist when that code executes you can't call the close method... if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); }
-
You do realize that the function is called "
detectPopupBlocker"?
Brad Australian - Captain See Sharp on "Religion" any half intelligent person can come to the conclusion that pink unicorns do not exist.
-
hi all, greetings. I've to detect the pop up blocker status using java script. I'm using the following code, which is taken from a site. But it is not working.can any one of you give me the soltuion for solve this issue.
function detectPopupBlocker() { var test=window.open("","","directories=no,width=100,height=100,menubar=no,resizable=no,scorllbars=no,status=no,titlebar=no,top=0,location=no"); if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); } }
Thanks in Advance babu -
hi all, greetings. I've to detect the pop up blocker status using java script. I'm using the following code, which is taken from a site. But it is not working.can any one of you give me the soltuion for solve this issue.
function detectPopupBlocker() { var test=window.open("","","directories=no,width=100,height=100,menubar=no,resizable=no,scorllbars=no,status=no,titlebar=no,top=0,location=no"); if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); } }
Thanks in Advance babu -
hi all, greetings. I've to detect the pop up blocker status using java script. I'm using the following code, which is taken from a site. But it is not working.can any one of you give me the soltuion for solve this issue.
function detectPopupBlocker() { var test=window.open("","","directories=no,width=100,height=100,menubar=no,resizable=no,scorllbars=no,status=no,titlebar=no,top=0,location=no"); if(!test) { test.close(); alert("A popup blocker was detected."); } else { test.close(); alert("No PopUp Detected"); } }
Thanks in Advance babuTry this snippet:http://lavanyadeepak.blogspot.com/2007/03/popup-blocker-detection.html[^]
Vasudevan Deepak Kumar Personal Homepage Tech Gossips