Cody Jenkins
Cody Jenkins

Reputation: 91

Can I capture an event when a Java applet fails to load?

I know that it is possible to register for error events after an applet has loaded. (e.g. document.getElementById('suchAndSuch').onError(function () { ... });) I'd like to know if it is possible to capture an event when the applet fails to load. Ideally I'd like to get some information from that error. For example, if I try to load an applet I might see this error message:

Java Applet security exception

I'd like to know that the applet failed to load because of security settings.

If there is not an event, is it possible to check the status of an applet from the applet tag? (i.e. something like document.getElementById('suchAndSuch').hadSecurityIssue)

Thank you!

Upvotes: 0

Views: 218

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168825

No there isn't. OTOH, the JS can try:

  1. Calling a method of the applet repeatedly to check it loads OK.
  2. Call a method of a running applet which provides any error or exception output.

Upvotes: 1

Related Questions