Now similar to Google Toolbar toolbar almost all provide pop-up blocking function, but in the actual web development work in many cases still need to automatically talk about the window, so you need to detect and remind users to disable the feature.
When using MSN WebMessenger, found that it can tell me to use the pop-up blocking function, after analyzing its code, extract the following program, you can directly use in their own projects, after testing, you can detect the Internet Explorer in Google and other tool bar blocking situation, But Gosurf and other multithreaded browser blocking pop-up page blocking is not detected, I will use a variety of browsers to do a test, add the results.
<! doctype html public "-//w3c//dtd html 4.0 transitional//en" > < HTML >< Head >< title > Pop-up windows Check </TITLE > < meta http-equiv =content-type Content = "text/html; Charset=utf-8 "> < Script language = javascript > function openwindow (u,n,w,h) { & nbsp var optionstring = "height=" + h + ", width=" + w + &NB Sp ", Menubar=no,titlebar=yes,resizable=yes,scrollbars=no,status=no,toolbar=no"; window.open (u,n,optionstring); var spbw = false; function showblockerwarning () { return spbw;} function init () { if (true = = &nbSp;detect ()) { spbw = true; &NBSP;&NBSP;&NBSP;&NBSP}} function detect () { var e = false; &n bsp; var pw1 = NULL; var pw2 = NULL; try { do { var d = New date (); var wName = "Ptest_" + d.gettime (); var testUrl = isybi () ? "popuptest.aspx" : ""; pw1 = window.open (Testurl,wname, "width=0,height=0,left=5000,top=5000", true); if (null = pw1 | | true = = pw1.closed) { e = true; break; } pw2 = window.open (Testurl,wname, "width=0,height=0"); if (null = pw2 | | true = = pw2.closed) &nbSp { e = true; break; } if (Isybi ()) { If (pw1 != pw2) { e = true; break; } } Pw1.close (); pw2.close (); pw1 = pw2 = NULL; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP} while (false); &NBSP;&NBSP;&NBSP;&NBSP} catch (ex) { e = true; &NBSP;&NBSP;&NBSP;&NBSP} if (null != &NBSP;PW1) { try { if (! pw1.closed) pw1.close (); } catch (ex) {} }