Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apparent Impossiblity in Java

Status
Not open for further replies.

Watts

Programmer
Jan 18, 2001
80
US
I am only using AWT classes. Since you can not make a modal Dialog box with respect to the IE window that an Applet is contained in. How then would I pop up a save changes Dialog when the user leaves the site or closes IE? I know I can put code in the stop() function of the Applet, but since using a Dialog with not hault IE from doing its thing, there is a major problem.

If anyone has done something like this, even if it requires something special, let me know, I have tried everything I think of.
 
It appears after many hours of searching that the above problem is impossible to solve with Java alone, instead I had to use a combination of JavaScript, Java, and a special function called showModalDialog for Internet Explorer in order to achieve this functionality.

All function calls were implemented through the JavaScript onUnLoad event. The stop() function in the Java Applet does not allow me to use the showModalDialog call (which is only recognized in HTML/JavaScript) so I had to use the onUnLoad event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top