SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist Azam.net's Avatar
    Join Date
    Apr 2002
    Location
    UK
    Posts
    479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question Any way of spawing a new window to beat the pop-up blockers?

    Is there any way of creating a new window, be it over or under the current window, by utilising a code that is not blocked by all those pop-up blockers?

    Pop-up blockers are becoming more and more prevalent and I'm worried about the effect they are having on my site. I use a TARGET=_BLANK command in the A HREF= to open links to other sites in a new window (why should I send away the visitors that it costs me 5 or 10 cents to come to my website to another site I'm not getting any money from in the same window?). What would a blocker do to such links?

    Thanks.
    Azam Marketing, Inc.
    Award-Winning Digital Marketing and Design Results Since 1997
    Click here to read acclaimed online marketing & design blog

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure the popup blockers block popup windows that were voluntarily opened? If the user clicks a link which opens a new window, I don't actually think the popup blockers stop that happening... only the popups which are triggered by onload() functions and the like.

    I'm sure there will be someone around to give you a second opinion though

    -Sam
    Sam Hastings

  3. #3
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my experience(using pop up blocking browsers, not 3rd party add-ons) the only one that blocks all pop ups, requested or not is Opera.

    In any case, I don't know why you'd have a problem, as pop-up blockers block JS pop-ups, not HTML new windows.

  4. #4
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Devilware.net
    Are you sure the popup blockers block popup windows that were voluntarily opened? If the user clicks a link which opens a new window, I don't actually think the popup blockers stop that happening... only the popups which are triggered by onload() functions and the like.

    I'm sure there will be someone around to give you a second opinion though

    -Sam
    as far as i know, popup blockers only block window.open calls that are not a result of a direct user interaction (i.e. clicking on something). they quite happily allow popups that the user initiated.
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  5. #5
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Any way of spawing a new window to beat the pop-up blockers?

    Originally posted by 1Lit_com
    I use a TARGET=_BLANK command in the A HREF= to open links to other sites in a new window (why should I send away the visitors that it costs me 5 or 10 cents to come to my website to another site I'm not getting any money from in the same window?).
    You wouldn't lose anyone.

    The most popular function in a browser is the back button--everyone knows how to use it, too. If they like your site they'll hit it to return. If they don't, it doesn't matter whether you open another window, tab, keep it in the same window, make it dance, shimmy and jive, or whatever.

    Have more confidence in your site! Listen to your user's suggestions and put them to work, and you'll have users that stick around and--most importantly--come back. :-)

    ~~Ian

  6. #6
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by anode
    In my experience(using pop up blocking browsers, not 3rd party add-ons) the only one that blocks all pop ups, requested or not is Opera.
    Not in Persto! :-p

    ~~Ian

  7. #7
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    should have read the original post first, before replying

    yes, if you're using normal links with target=_blank, popup blockers won't block it. now, to carry the thought further, you can combine a link that uses both javascript and (if that fails) target=_blank to open a window. this way, it will work nicely for browsers that have no blocking and js enabled, but will also work in other browsers (with block and no js). the way to do this:

    Code:
    <a href="wherever.html" target="_blank" onclick="window.open(this.href, this.target,'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=450,height=550'); return false;">click here</a>
    this way, if javascript is enabled, it pops up a new window and the return false bit prevents the browser from its normal behaviour (opening a new blank window). if js is not enabled, this links still opens a new window the plain html / browser way...

    hope that made sense...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  8. #8
    SitePoint Evangelist Azam.net's Avatar
    Join Date
    Apr 2002
    Location
    UK
    Posts
    479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    > Have more confidence in your site!

    The sites on which I want to create the pop-ups are a load of rubbish. I'll admit it myself. Would not use pop-ups on my 'quality' sites. But I don't expect anybody to visit my blatently commercial sites more than once and therefore need to get as much 'bang for my buck' as possible on the customer's first and probably only visit. Hence the need for a pop-up/under.

    Your script does make sense, redux. Any way of creating a new pop-up/under automatically whilst getting around the pop-up blockers? Thanks.
    Azam Marketing, Inc.
    Award-Winning Digital Marketing and Design Results Since 1997
    Click here to read acclaimed online marketing & design blog


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
  •