Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

URL launching behaviour using showDocument in IE6(sp2 XP)

Thread view: 
porter - 10 Nov 2005 11:29 GMT
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
Rhino - 10 Nov 2005 13:57 GMT
> Dear Java Experts,
>
[quoted text clipped - 34 lines]
>
> Jason

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

Rhino
Mickey Segal - 10 Nov 2005 15:33 GMT
> 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");
porter - 10 Nov 2005 17:50 GMT
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.)
porter - 16 Nov 2005 16:49 GMT
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.
Mickey Segal - 16 Nov 2005 17:56 GMT
> 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).


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.