URL launching behaviour using showDocument in IE6(sp2 XP)

P

porter

Dear Java Experts,

Not sure if this is the best place to post this: We have some strange
behaviour with IE6 on XP with SP2 installed. We have a java applet that
uses

getAppletContext.showDocument(URL("a url"),"_blank");

to launch a results window: This, is, of course a pop-up, so our users
have to configure their browser to allow popups for the site. That
works fine - the window pops up.

The weirdness is as follows: The URL underlying this is actaully php
script, that dynamically generates some content in a frameset (yes .. I
know *sigh*)

In one of the frames a button that allows the user to save some data is
presented that should popup a classical "save file dialog"

The problem is this: If we access the php script URL directly (cut and
paste it into IE6 XP sp2) it shows the content and then click on the
"Save" button, the save file dialog pops up just fine, and it all
works.

If we launch the URL from the showDocument command, the popup window
page displays, but when you click on the 'save' button, the initial
popup window containing the results closes (leaving *only* the save
file dialog!)

This only happens with IE6 sp2 XP ... every other browser we've tried
works fine ...... (and IE6 XP sp1 works fine too ...)

Any one seen this? I haven't been able to find any bug reports that
suggest any workarounds ....

TIA

Jason
 
R

Rhino

porter said:
Dear Java Experts,

Not sure if this is the best place to post this: We have some strange
behaviour with IE6 on XP with SP2 installed. We have a java applet that
uses

getAppletContext.showDocument(URL("a url"),"_blank");

to launch a results window: This, is, of course a pop-up, so our users
have to configure their browser to allow popups for the site. That
works fine - the window pops up.

The weirdness is as follows: The URL underlying this is actaully php
script, that dynamically generates some content in a frameset (yes .. I
know *sigh*)

In one of the frames a button that allows the user to save some data is
presented that should popup a classical "save file dialog"

The problem is this: If we access the php script URL directly (cut and
paste it into IE6 XP sp2) it shows the content and then click on the
"Save" button, the save file dialog pops up just fine, and it all
works.

If we launch the URL from the showDocument command, the popup window
page displays, but when you click on the 'save' button, the initial
popup window containing the results closes (leaving *only* the save
file dialog!)

This only happens with IE6 sp2 XP ... every other browser we've tried
works fine ...... (and IE6 XP sp1 works fine too ...)

Any one seen this? I haven't been able to find any bug reports that
suggest any workarounds ....

TIA

Jason
Maybe this behaviour stems from the many security improvements made in SP2
to foil people who put advertising popups on websites.

Rhino
 
M

Mickey Segal

Rhino said:
Maybe this behaviour stems from the many security improvements made in SP2
to foil people who put advertising popups on websites.

We ran into some other problems using showDocument (www.segal.org/java/pop/)
and ended up using the fact that our applet was digitally signed to open new
browser windows on Internet Explorer on Windows XP using:

Runtime.getRuntime().exec("\"C:\\Program Files\\Internet
Explorer\\IEXPLORE.EXE\" " + url);

In other environments one can use the straightforward:

getAppletContext().showDocument(url, "_blank");
 
P

porter

I suspect that this may be the case, but one has to wonder: I doubt the
behaviour we see was the intent (it makes no sense - the user has to
request the save that causes the problem.)

The point here is that the problem is *not* the pop up window - the
problem is with a save button from within that pop up window.

The security of the pop up I can cope with - a user has to allow the
site to pop up a window: That's fine - it's their perrogative.

The problem is that the popped up window is then just broken, which
make no sense.

We may have to move to using a signed applet instead of an unsigned one
to get round this bug. Gah. works great in firefox, and opera, and
netscape, and probably konqueror too ... (hmm - maybe not.)
 
P

porter

I know that with groups I sometimes get frustrated that a posting
contains a question, but no answer, so as we've now discovered the
cause of this (and a workaround) I'm posting in a solution to my own
question:

First - It is an IE6 XP sp2 bug. Period.

Our page launched from the java showDocument call contained a frameset.
In one of the frames there are several buttons (Save file X, Save file
Y etc.)

If any of the 'save' buttons in the page is set so that URL <href>'s
target attribute is explicitly set to "_top", they all work (even those
with the attribute "_self")

If they are all set as "_self" then the bug manifests itself, but only
if the browser window is launched from a java showDocument call. If you
create the page through other means you don't see the problem.

...... in the words of Homer Simpson .........

"Doh!"

Thanks to all...

J.
 
M

Mickey Segal

porter said:
We may have to move to using a signed applet instead of an unsigned one
to get round this bug. Gah. works great in firefox, and opera, and
netscape, and probably konqueror too ... (hmm - maybe not.)

I discovered yesterday that treatment of popups in Firefox 1.5 is changed to
now block showDocument. We now use the Runtime.getRuntime().exec approach
in Firefox as we do for Internet Explorer. Be sure to test in Firefox 1.5
(currently in beta).
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top