By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,358 Members | 2,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,358 IT Pros & Developers. It's quick & easy.

<FAQENTRY> window.open methods causes my script crash in Internet Explorer

P: n/a
VK
I'm using window.open method in my script to open poup window. Recently
Internet Explorer users reported that the script crashes on their
machine with different runtime errors.

See the bug:
<http://support.microsoft.com/default.aspx?scid=kb;en-us;888021>

The statement like
myPopup = window.open(args);
gives you runtime error and halts the script execution *if a 3rd party
popup blocker is installed and active*. The runtime error can be one of
following (average % from 100 runs):

1. "The callee (server [not server application]) is not available and
disappeared;
all connections are invalid. The call did not execute." - 80%

2. "The RPC server is unavailable" - 15%

3. "Unspecified error" - 5%

On the first attempt on the fresh page the first error always comes
first. 2nd and 3rd errors are appearing sporadically if you tortue the
same page long enough.

Only try-catch block allows you to prevent the script execution abort:

try {
myPopup = window.open(args);
}
catch (e) {
// popups blocked by a 3rd party
}

The Microsoft position (as I got it) is: "Do not use 3rd party popup
blockers". With 82% market share and a global epidemie of anti-popups
from everywhere it means that within a year or less pupup usage will be
limited to the intranet area where you can admin the enviroment.

window.showModalDialog method seems not affected by popup blockers and
it doesn't lead to script errors.

As I'm finding this issue high-crucial, I copy this message to the new
post as FAQENTRY.

Oct 25 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 25 Oct 2005 01:21:10 -0700, "VK" <sc**********@yahoo.com> wrote:
I'm using window.open method in my script to open poup window. Recently
Internet Explorer users reported that the script crashes on their
machine with different runtime errors.
The script doesn't crash, there's a script error, you should always
cope with script errors.
The Microsoft position (as I got it) is: "Do not use 3rd party popup
blockers".
I think the position should actually be use competent 3rd party
blockers, I think it's likely that either the 3rd party have
deliberately chosen to produce an error so people can catch it, or are
incompetent.
window.showModalDialog method seems not affected by popup blockers and
it doesn't lead to script errors.
It's certainly effected by the popup blockers I use.
As I'm finding this issue high-crucial, I copy this message to the new
post as FAQENTRY.


But you're the first person who's ever asked about it I think? Is it
really frequently asked?

Jim.
Oct 25 '05 #2

P: n/a
VK

Jim Ley wrote:
On 25 Oct 2005 01:21:10 -0700, "VK" <sc**********@yahoo.com> wrote:
I'm using window.open method in my script to open poup window. Recently
Internet Explorer users reported that the script crashes on their
machine with different runtime errors.
The script doesn't crash, there's a script error, you should always
cope with script errors.


You mean to have the whole script in try-catch block? Kill me if it's a
common practice yourselve following.
The Microsoft position (as I got it) is: "Do not use 3rd party popup
blockers".


I think the position should actually be use competent 3rd party
blockers, I think it's likely that either the 3rd party have
deliberately chosen to produce an error so people can catch it, or are
incompetent.


This topic reise from:
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/e95c1595d6a9b0d9/ea3d9a9e0e2cc98e?hl=en#ea3d9a9e0e2cc98e>

Should we consider the latest Symantec Norton Antivirus as "uncompetent
3rd party" or should we stay more humble?
window.showModalDialog method seems not affected by popup blockers and
it doesn't lead to script errors.


It's certainly effected by the popup blockers I use.


Could you tell which one it is (as I'm still testing around).
But you're the first person who's ever asked about it I think? Is it
really frequently asked?


I think it will be FAQ of the season. The reason it's not yet:
1) It's almost impossible to catch it at the design mode. You need
feedback from a reasonable amount of your visitors with 3rd party
blockers activated to smell the aches.
2) Error message is random (one of of three listed) so you first think
of script errors rather than of innocent looking window.open

So I think a lot of people already have this issue but just not aware
of it or looking (and asking) in the wrong place.

Oct 25 '05 #3

P: n/a
VK said the following on 10/25/2005 7:01 AM:
Jim Ley wrote:
On 25 Oct 2005 01:21:10 -0700, "VK" <sc**********@yahoo.com> wrote:

I'm using window.open method in my script to open poup window. Recently
Internet Explorer users reported that the script crashes on their
machine with different runtime errors.
The script doesn't crash, there's a script error, you should always
cope with script errors.

You mean to have the whole script in try-catch block? Kill me if it's a
common practice yourselve following.


My approach to window.open problems is not to use it. Then there is no
problem to deal with. If a user wants a new window, most know how. If
they don't, don't try to force it on them.
The Microsoft position (as I got it) is: "Do not use 3rd party popup
blockers".
I think the position should actually be use competent 3rd party
blockers, I think it's likely that either the 3rd party have
deliberately chosen to produce an error so people can catch it, or are
incompetent.

This topic reise from:
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/e95c1595d6a9b0d9/ea3d9a9e0e2cc98e?hl=en#ea3d9a9e0e2cc98e>

Should we consider the latest Symantec Norton Antivirus as "uncompetent
3rd party" or should we stay more humble?


If Norton's latest popup blocker crashes the browser, then yes it is
incompetent software. And no, I won't stay humble about it.
window.showModalDialog method seems not affected by popup blockers and
it doesn't lead to script errors.
It's certainly effected by the popup blockers I use.

Could you tell which one it is (as I'm still testing around).

But you're the first person who's ever asked about it I think? Is it
really frequently asked?

I think it will be FAQ of the season. The reason it's not yet:
1) It's almost impossible to catch it at the design mode. You need
feedback from a reasonable amount of your visitors with 3rd party
blockers activated to smell the aches.
2) Error message is random (one of of three listed) so you first think
of script errors rather than of innocent looking window.open


3) Its not a javascript problem, its a popup-blocker problem. If the
browser crashes with the blocker running, but, doesn't crash without the
blocker (using the same exact code), then the problem is the *blocker*
not the code.
So I think a lot of people already have this issue but just not aware
of it or looking (and asking) in the wrong place.


And you are trying to get them to complain in the wrong place yet again?
Question: My popup blocker crashes my browser. What can I do?
Answer: Get a better popup blocker.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 25 '05 #4

P: n/a
VK
Randy Webb wrote:
Question: My popup blocker crashes my browser. What can I do?
Answer: Get a better popup blocker.
It doesn't say on
<http://support.microsoft.com/default.aspx?scid=kb;en-us;888021> that
"there are some bad 3rd party popup blockers (the list follows)".
It simply states that "This issue may occur if a third-party pop-up
blocker is installed on your computer." So it's a global IE failure.
For the moment I did not find one "good" 3rd party blocker thus that
would not reproduce the problem (except IE's own blocker of course).

My approach to window.open problems is not to use it.

So always was mine. But should we just keep in secret that
window.open() method (which is as old as JavaScript itself) is causing
now script errors? It would be a kind of penalization of popup users.
Whatever we may think about popups, penalization for bad development
technique is not our duty or privilege IMHO.

Oct 25 '05 #5

P: n/a
VK said the following on 10/25/2005 2:21 PM:
Randy Webb wrote:
Question: My popup blocker crashes my browser. What can I do?
Answer: Get a better popup blocker.

It doesn't say on
<http://support.microsoft.com/default.aspx?scid=kb;en-us;888021> that
"there are some bad 3rd party popup blockers (the list follows)".
It simply states that "This issue may occur if a third-party pop-up
blocker is installed on your computer." So it's a global IE failure.


It is a global IE failure based on having a 3rd Party popup blocker. It
is not a global IE failure based on any javascript code. That code may
trigger the failure but it is not the cause of that failure. The cause
of that failure is a crappy popup blocker or a crappy browser, not the
js code.
For the moment I did not find one "good" 3rd party blocker thus that
would not reproduce the problem (except IE's own blocker of course).
I would have to guess that AOL's internal popup blocker would have to
be considered a 3rd Party blocker since it is not an IE blocker but
blocks IE popups and I have never had a crash while using it.
My approach to window.open problems is not to use it.


So always was mine. But should we just keep in secret that
window.open() method (which is as old as JavaScript itself) is causing
now script errors?


It's not the code that is causing it. It is either the browser or the
popup blocker. And it tends towards the popup blockers being at fault,
not the browser.
It would be a kind of penalization of popup users.
GOOD! If people start staying away from sites that abuse it, the sites
will stop using it.
Whatever we may think about popups, penalization for bad development
technique is not our duty or privilege IMHO.


And it is the bad development of the popup blockers, not my script, that
is the problem.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 26 '05 #6

P: n/a
VK
<http://www.jibbering.com/faq/#FAQ4_42>
4.42 How do I open a new window with javascript?
New windows can be opened on browsers that support the window.open function
and are not subject to the action of any pop-up blocking mechanism
with code such as...


"Life is a set of forced compomises" :-)
The issue is closed then?

Oct 26 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.