How can I detect whether a java-applet has been loaded successfully without polling the browser /using setTimout ?
Is there any event that I can bind to?
The problem is: there is a pop up asking the user whether he trusts the applet or not, and that takes a few seconds until the user clicks "Yes" ,meanwhile my code fails to execute because the applet has not been loaded.
You mean from javascript ? You can ask the applet. Have it set a boolean to true in init(), and return this in a method you call ... oh wait, you wrote "without using setTimeout". Well, in this case, I guess you have to go the other way around, and have your applet call a javascript method (for instance with JSObject.getWindow(this);)... But I think this is more difficult/bug prone than using a timer until the applet is loaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With