Opening multiple windows in IE

S

Sebastian

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!
 
T

Thomas 'PointedEars' Lahn

Sebastian said:
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
 
S

Sebastian

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');
}
}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top