How can I start and stop an applet from another applet?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Manuela_Hofer
Posted On:   Tuesday, November 6, 2001 03:01 AM

Hello!


I've two applets which are embedded in separate windows. the second one is started via JavaScript if the other one becomes started. Now I want to have a button in the first applet which allows me to start and stop the other applet (close and open the window of the applet). How can I do this?


Thanx in advance,

Manuela

Re: How can I start and stop an applet from another applet?

Posted By:   Lars_Eing  
Posted On:   Wednesday, November 7, 2001 11:36 AM

Hello Manuela!



Maybe this small java/javascript-trick will help:



Add a public variable to your first applet that holds the window-state of the second window.



Now add a javascript-function to your first window that checks the state of the public variable every x seconds.(Use window.setTimeout inside the function to call itself again and again)



If the state of the variable has been changed your checker-function can reopen/close the second window using the standard javascript-functions...

Re: How can I start and stop an applet from another applet?

Posted By:   John_Zukowski  
Posted On:   Wednesday, November 7, 2001 08:04 AM

Communicating between applets is already covered in the FAQ.
About | Sitemap | Contact