Opening multiple windows in IE

Discussion in 'Javascript' started by Sebastian, Jun 3, 2009.

  1. Sebastian

    Sebastian Guest

    Hello all, was hoping someone might have a solution to this, I am
    trying to open a link via target = _blank and another via window.open
    on the same click (not my idea, but it's what the client wants.)

    IE's (v.6-8) popup blocker w/ default settings blocks the actual HREF
    (bad) and opens the second window.

    I also tried onmousedown which opens lets HREF return but blocks the
    second window (not as bad, but not ideal).

    Here's some demonstration code:

    <html>
    <head>
    <script>
    function pop() {
    window.open('http://search.yahoo.com', 'foo', 'width=350,
    height=250');
    }
    </script>
    </head>
    <body>
    <ol>
    <li><a href="http://www.google.com" target="_blank" onclick="pop
    ();">onclick</a></li>
    <li><a href="http://www.google.com" target="_blank" onmousedown="pop
    ();">onmousedown</a></li>
    </ol>
    </body>
    </html>

    Any solutions or suggestions, would be greatly appreciated!
     
    Sebastian, Jun 3, 2009
    #1
    1. Advertising

  2. Sebastian wrote:
    > Hello all, was hoping someone might have a solution to this, I am
    > trying to open a link via target = _blank and another via window.open
    > on the same click (not my idea, but it's what the client wants.)


    Tell them to want differently (in kinder words, of course). Popup windows
    are pretty much obsolete nowadays.

    > IE's (v.6-8) popup blocker w/ default settings blocks the actual HREF
    > (bad) and opens the second window.


    So the user needs to disable the popup blocker (for this site).

    > I also tried onmousedown which opens lets HREF return but blocks the
    > second window (not as bad, but not ideal).


    There is nothing you can do as a developer to prevent the popup blocker from
    doing what it is supposed to do. If you find a workaround, be sure that it
    will be considered a bug waiting to be fixed soon.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Jun 3, 2009
    #2
    1. Advertising

  3. Sebastian

    Sebastian Guest

    On Jun 3, 11:44 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > Tell them to want differently (in kinder words, of course).  Popup windows
    > are pretty much obsolete nowadays.


    Believe me, I'm trying :(
     
    Sebastian, Jun 3, 2009
    #3
  4. Sebastian wrote:
    > On Jun 3, 11:44 am, Thomas 'PointedEars' Lahn <>
    > wrote:
    >> Tell them to want differently (in kinder words, of course). Popup windows
    >> are pretty much obsolete nowadays.

    >
    > Believe me, I'm trying :(
    >

    Why not have a normally invisible layer floating somewhere inside the
    already opened window?
     
    The Natural Philosopher, Jun 3, 2009
    #4
  5. Sebastian

    Sebastian Guest

    On Jun 3, 12:01 pm, The Natural Philosopher <>
    wrote:
    > Why not have a normally invisible layer floating somewhere inside the
    > already opened window?


    They shot that down, guess I will try again.

    It's a wonder FF does not block it as well when you can do crap like:

    function pop() {
    for (var i = 0; i <= 20; i += 1) {
    window.open('about:mozilla', 'foo' + i, 'width=350, height=250');
    }
    }
     
    Sebastian, Jun 3, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad
    Replies:
    5
    Views:
    563
  2. =?Utf-8?B?aGVscFNlZWthcg==?=

    Avoid opening multiple browsers

    =?Utf-8?B?aGVscFNlZWthcg==?=, Dec 8, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    400
    Jeff Evans
    Dec 8, 2004
  3. doug
    Replies:
    6
    Views:
    4,661
    Andrew Thompson
    Jan 27, 2004
  4. Paul Moffitt

    opening multiple browser windows on command

    Paul Moffitt, Sep 18, 2003, in forum: ASP General
    Replies:
    1
    Views:
    126
    Ray at
    Sep 18, 2003
  5. fniles
    Replies:
    0
    Views:
    300
    fniles
    Apr 26, 2009
Loading...

Share This Page