SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Member
    Join Date
    May 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    find popup blocker blocked or not

    hi,

    How to find the popup blocker is blocked in the browser or not, with out using window.open()?

    I want to know whether the popup blocker is blocked or not even before calling the window.open() method.

    Regards,
    Senthilkumar

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't I don't think.

    You should be able to use something like

    Code javascript:
    var win = window.open('url');
                if(!win) {
                    alert('Your browser has blocked a popup!');
                    return;
                }


  3. #3
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess that should do it, but whatever I do it just doesn't display that alert... I tried different variations but still no luck...
    Proud member of this community.
    ____________________________

  4. #4
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by haiku View Post
    I guess that should do it, but whatever I do it just doesn't display that alert... I tried different variations but still no luck...
    any error when you try that?
    renkai.com

  5. #5
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no. it either opens the popup window or not. no errors shown. (ff, ie, opera, maxthon)
    Proud member of this community.
    ____________________________

  6. #6
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only time you will notice it work is when you run it remotely. If you run it locally, it will always open the window.


  7. #7
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gRoberts View Post
    The only time you will notice it work is when you run it remotely. If you run it locally, it will always open the window.
    Not so sure about that... Because when I run it in IE and I choose to disallow popup windows from localhost and refresh the page the popup info bar will be shown at the top of the page (so, no popup will be opened)... (the same with the others, only that I don't get any notifications).

    I currently have a popup blocker detector that tries to open and close a popup window but I don't quite really like it because of that small popup window opening and closing imediately if no popup blocker is detected so I kind of am in need for a new method...
    Proud member of this community.
    ____________________________

  8. #8
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ask yourself if opening a new window is entirely necessary! Is there any other way the information can be displayed within the page?
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  9. #9
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you have an image gallery you'll find it useful to display a large version of the image in a popup window rather than in the current page (the same goes for those "help" popups as you can see in any admin area of a web hosting account). They're still useful, IMO
    Proud member of this community.
    ____________________________

  10. #10
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by haiku View Post
    When you have an image gallery you'll find it useful to display a large version of the image in a popup window rather than in the current page (the same goes for those "help" popups as you can see in any admin area of a web hosting account). They're still useful, IMO
    There are more graceful and less invasive ways to show larger versions of images or help information. Using inline popups is a much better way of doing this. For portfolios I think it's best to use scripts such as Lightbox or Thickbox. And for help information you can simply show the info somewhere within the page instead of forcing a new window on the user...
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  11. #11
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, I know, but I sometimes find a popup window better than anything else (I always use popups in admin areas rather than any other (maybe complicated) solution - well, there are exceptions though...)
    Proud member of this community.
    ____________________________

  12. #12
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^ It might be true that YOU find it better than it's alternatives, but what about the user? ... what does the user prefer?
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  13. #13
    SitePoint Zealot
    Join Date
    Apr 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh, yes! the user preferences...

    well, I guess that depends on what kind of users are they... The SMF forum is using popups on a large scale in their forum script, many web hosters are using popups in their admin areas too, and so on and so forth..., so you see, it's not just about ME here

    But, as I said, it really depends on the clientele...If "my clients" are happy with "my way" of doing things why should I change for something they're probably not ready for, or maybe won't like?

    Finally, all comes down to the user preferences, I guess... I mean, don't we all make *.whatever_we_do to make our clients happy?
    Proud member of this community.
    ____________________________


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
  •