SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2002
    Location
    East Anglia, UK
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    detecting whether browser refuses pop-ups

    Hi, new to this forum. I'm having trouble with Opera browsers that refuse to accept pop up windows. Ideally, I'd like to detect for the possibility of the Opera user having turned off the accept pop-ups option so that I can send my message via the rather inelegant Javascript alert method instead. Is there is a way to do this?

    Thanks for any help.

    Carl_b

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Even if it were possible, I think the fact that the user has chosen not to view pop-ups should tell you something rather than trying to find ways around it...

    ...IMHO of course.



    Andy
    From the English nation to a US location.

  3. #3
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: detecting whether browser refuses pop-ups

    While I agree it would be really bad to do this, I think there is a way - just let the popup set a session variable or cookie when loading. Then, you can check if the use has loaded you popup or not. Note that the it may be misleading, as some users have learned to close windows reeeal fast.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  4. #4
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe that mozilla throws a javascript exception when it blocks a pop-up, so if you could catch that, you'd know the popup was blocked.

    Please do bear in mind, however, that if the user blocked the pop-up, something as in-yer-face as an alert box is just going to annoy them even more.


Bookmarks

Posting Permissions

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