Results 1 to 4 of 4

Thread: Detect pop up blocker

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Detect pop up blocker

    Does anyone know if there is a way to detect if pop up blockers are installed ?

    My Intranet ASP.Net applications always start with a pop up to remove navigation buttons from Explorer and I need to be able to detect if they are enabled so I can inform the user.

    Parksie

  2. #2
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: Detect pop up blocker

    I'm no ASP expert, but I've seen it done in Java.. I get a message sometimes with proprietary payroll stuff at work saying "Your computer has blocked a popup, click here to open it"

    however, it's a Java window, not an actual Explorer window.

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  3. #3
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Detect pop up blocker

    The cannot be done directly with ASP.NET.
    As conipto said, you can use JS. Not sure how mind you.

    Do you not get a warning message that a popup has been blocked?

    Woka

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Detect pop up blocker

    You do it by opening a small 1x1 window and closing it.

    Code:
     var testwin = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no');
     if(testwin)
        var hasblocker = false
     else
        var hasblocker = true
    testwin.close()
    Then check the value of hasblocker.

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width