SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast LogicWeb's Avatar
    Join Date
    Feb 2008
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation popup window blocker issue

    I am using the below script to popup a coupon window automatically. However, Chrome and other browsers are blocking the popup, as expcected. Is there a way to avoid this from being blocked by the pop-up blocker? Also, how do I center it?
    Code:


    http://tny.cz/9cef3978

    Thanks in advance
    Talk Jesus Forums [ Father's Love Letter ]
    ..............................................................
    LogicWeb...a smart web solution [ managed hosting since 2004 ]

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    There is no way to change the default behaviour of browser popups unless you create a plugin for each browser that overrides the default handlers but that would be more work and time consuming. To center the window see the following link.

    http://stackoverflow.com/questions/4...ndow-on-screen
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle

  3. #3
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,341
    Mentioned
    179 Post(s)
    Tagged
    9 Thread(s)
    As popups are more or less blocked by default, what a lot of sites do today is to use a Lightbox effect, whereby you add a darker overlay to your user's screen and centre a smaller window in the middle of that.
    I could show you how to do that if you want, although you might want to consider the usability implications of this method.


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
  •