This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Applets and the fly likes showModelessWindow() in IE restricts javascript to applet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "showModelessWindow() in IE restricts javascript to applet communication" Watch "showModelessWindow() in IE restricts javascript to applet communication" New topic
Author

showModelessWindow() in IE restricts javascript to applet communication

Robbie Knight
Greenhorn

Joined: Sep 18, 2006
Posts: 3
Incase, the title didn't give it away, here is my scenario:

I have a main html window that pops up a dialog box using the showModelessDialog method. This method is only available in IEs javascript implementation. That's OK because the business all use IE.

the popped up dialog box contains an applet. Method calls happen as follows. user clicks on button -> javscript method is invoked -> javascript method calls applet method -> applet method churns (processes) -> applet method calls javascript method (to update certain fields) -> applet method exits -> user is happy.

However, the last applet call into the javascript fails in IE. is this a bug? When I use window.open instead of window.showModelessDialog, then the bug is not apparent.

Any Ideas?

Here is a test setup that will reproduce the problem:

main window:


popup window



Applet. (you will need to have netscape's plugin.jar in your classpath in order to run - this should be available in your java jre's lib folder)


[ UD: added linebreaks to preserve layout ]
[ September 28, 2007: Message edited by: Ulf Dittmer ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42061
    
  64
Welcome to JavaRanch.

Just a wild guess, but maybe LiveConnect (in the shape of the JSObject.getWindow method) doesn't consider a modeless dialog a window. There may be something missing that it needs to function.

How does the call fail - does it return a null object, or what happens?

If you can't get this to work, an alternative to JSWindow might be to use the Common DOM API, which also lets an applet manipulate the enclosing HTML page.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: showModelessWindow() in IE restricts javascript to applet communication