This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Applets and the fly likes applet and modal window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "applet and modal window" Watch "applet and modal window" New topic

applet and modal window

Serge Adzinets
Ranch Hand

Joined: Nov 26, 2002
Posts: 166
Hi, all,
I've got the following problem.
There is a modal browser window with an applet in it. Reacting to user action, the applet calls javascript function, which opens another modal window with an applet in it. At this moment the browser hangs!
If the window being opened does not contain an applet, all works fine. If the parent window is not modal, all works fine. If the child window is opened not from applet, all works fine again.
Does anybody know a workaround for this?
Browser: IE 6.0.
JVM MS or Sun 1.3.1 (under Sun's JVM it doesn't hang but the applet is empty instead).
Modal windows are called with IE's showModalDialog function
Applet calls javascript via netscape.javascript.JSObject class.
Thanks in advance,

Best Regards,<br />Serge
Joe Ess

Joined: Oct 29, 2001
Posts: 8935

My wild-assed guess would be that having two modal dialogs/windows displayed from the same parent browser would hang because the two dialogs would be stuck fighting over which got the focus. Is there a way to turn off the modality of the first window when displaying the second?

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Paul Paul

Joined: Apr 14, 2005
Posts: 1
I'm having the same problem, anyone come up with a work-around?
It is sorta covered in the JavaRanch Style Guide.
subject: applet and modal window