473,466 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

multiple calls to window.open not succeeding in IE

I have a situation where I need to respond to a link click by opening 2
windows and navigating to a URL in the parent window. Here's the
function I invoke:

function handleOfferLink(selfURL, instructionURL, offerURL)
{
window.open(selfURL, '_self').focus();
window.open(offerURL, '_blank').focus();
window.open(instructionURL, '_blank',
'width=435,height=390,top=0,left=0').focus();
return 0;
}

This code is invoked as a direct result of the user clicking a link
(href). On FireFox (FF) I get totally expected behavior: both windows
open and the parent window navigates to selfURL, however on Internet
Explorer (IE), something interesting happens: the first call to open a
new window succeeds, while the second is blocked. If I swap those 2
lines around, instructionURL opens, while offerURL does not. I've
tried taking out the dimension specs and everything else you could
think of it. It just looks like IE doesn't wanna allow more than 1
popup at a time, even if it's in response to a user action. I can't
seem to find a good guideline to IE's popup blocker. Any advice?

Jun 2 '06 #1
4 2121

Alexey wrote:
I have a situation where I need to respond to a link click by opening 2
windows and navigating to a URL in the parent window. Here's the
function I invoke:

function handleOfferLink(selfURL, instructionURL, offerURL)
{
window.open(selfURL, '_self').focus();
window.open(offerURL, '_blank').focus();
window.open(instructionURL, '_blank',
'width=435,height=390,top=0,left=0').focus();
return 0;
}

This code is invoked as a direct result of the user clicking a link
(href). On FireFox (FF) I get totally expected behavior: both windows
open and the parent window navigates to selfURL, however on Internet
Explorer (IE), something interesting happens: the first call to open a
new window succeeds, while the second is blocked. If I swap those 2
lines around, instructionURL opens, while offerURL does not. I've
tried taking out the dimension specs and everything else you could
think of it. It just looks like IE doesn't wanna allow more than 1
popup at a time, even if it's in response to a user action. I can't
seem to find a good guideline to IE's popup blocker. Any advice?

By calling: window.open(selfURL, '_self') first, I would suspect that
the script is being dismissed before it can complete. Is it OK to call
it last?

Jun 2 '06 #2

Stephen Chalmers wrote:
By calling: window.open(selfURL, '_self') first, I would suspect that
the script is being dismissed before it can complete. Is it OK to call
it last?


That's a valid point and I've considered it. I don't believe that is
the cause of the problem for 2 reasons:

1. I do see other lines executing after that line, so it's not as
though JS execution on that page is halted as soon as I make a call
window.open(selfURL, '_self').

2. In one of my tests, I've commented that line out and saw no change
in behavior.

Jun 5 '06 #3

Alexey wrote:
Stephen Chalmers wrote:
By calling: window.open(selfURL, '_self') first, I would suspect that
the script is being dismissed before it can complete. Is it OK to call
it last?


That's a valid point and I've considered it. I don't believe that is
the cause of the problem for 2 reasons:

1. I do see other lines executing after that line, so it's not as
though JS execution on that page is halted as soon as I make a call
window.open(selfURL, '_self').

2. In one of my tests, I've commented that line out and saw no change
in behavior.


Have you eliminated the popup blocker by disabling it?

Jun 5 '06 #4

Stephen Chalmers wrote:
Have you eliminated the popup blocker by disabling it?


I'm sorry, I don't quite understand. If I disable the popup blocker in
the browser, the popups work fine. I'm trying to get this to work for
people who've not taken that step. Does that answer the question?

Jun 6 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Evan Kontos | last post by:
I am using the window.open function to open a small window and I am using GET to get values back from that window. I want to be able to open another from the second window but I get an error...
3
by: Voetleuce en f?nsievry | last post by:
G'day I'm looking for a script that can search multiple instances of Google (or other search engines optionally). The user types in a single word in the text field, presses ENTER or the submit...
6
by: Shashi | last post by:
I have developed ASP.Net application using .Net 1.1 Framework. When the user clicks image file through Java script I am using my search window as below. QueryString =...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
1
by: dnes | last post by:
Open Multiple New Browser Windows from ASP.NET I'm having trouble figuring out how to open multiple new browser windows (each one displaying something different). As you can see from the code...
5
by: steve.chambers | last post by:
I'm sure this q must have been asked before but I'm really struggling to find the answer anywhere so have finally given up and will consult the usenet community - hopefully there's someone out...
5
by: lilOlMe | last post by:
Hi there! I'm developing some crazy Tab Control in .NET that uses JavaScript. A particular JavaScript method needs to be called during the window.onload event in order to initialize my Tab...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
1
by: bizt | last post by:
Hi, I am having my first real attempt at an ajax class as so far Ive managed to build one that, once instatiated, will allow me to define which function it will call on completion then retrieves...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.