Detecting pop up blockers

Discussion in 'ASP.NET / ASP.NET Core' started by yorkshirela, Apr 4, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I would like to know how pop up blockers can be detected. I have noticed thatthis site (DiscountASP) detects pop up blockers (when clicking on Contact Customer Support) and instead of opening a new browser window (since it can't) it presents the contact formon the same window. How is this done? Any help in this regard will be greatly appreciated.
     
  2. Hello Bruce. I am not sure I understand your answer. Let me explain:</o:p>
    </o:p>
    You say: ?most pop up blocker allows pop up when the user click on the link?. I don?t think this is true, at least not with XP SP2 pop-up blocker.</o:p>
    </o:p>
    1. The pop-up blocker included with XP SP2 can be configured in many different ways. When it is on, pop-ups will NOT be allowed unless you have added the domain to the list of ?allowed sites? or you have temporarily disabled it. Any other case, they are blocked.</o:p>
    </o:p>
    2. If you login to discountasp.net and you click the ?Contact Customer Support? two things can happen. You can either see a new browser window come up;or not. This depends in my case of how I have set up the pop up blocker that comes with XP SP2. If I have set itto block, the site finds out and instead of displaying the form in a new browser window (the pop up), it displays it in the same form.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    No. we do not detect popup blocker. most pop up blocker allows pop up when the user click on the link.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. There is no detection on that page. if you view the source, you can see how it's done...

    <A href="/support.aspx" onclick='openWindow(&amp;quot;https://my.discountasp.net/support.aspx?popup=true&amp;quot;,600, 500);return false;'>

    the popup blocker is blocking the javascript openWindow method. When this fails (false will not be returned)the browser will open the url specified in the 'href' attribute of the anchor.

    This is the proper way to perform popups. It helps with people that have popup blockers and works with people that do not have javascript or have their javascript disabled.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page