IT. Expert System.

Java Standard Edition (SE)

Applet Status And Event Handlers

Applet Status And Event Handlers

Java Rich Internet Applications Guide > Applet Developer's Guide > Applet Status and Event Handlers

Beginning in the Java SE 7 release, you can check the value of the status variable of an applet while it is being initialized. This check is non-blocking and immediately returns the status of the applet. You can explicitly check the status of the applet while it is loading and perform relevant actions or register event handlers that will automatically be invoked during various stages of applet initialization. The applet should be deployed with the java_status_events parameter set to true in order to use this functionality. See the Handling Initialization Status With Event Handlers topic in the Java Tutorials for step by step instructions and an example.

Applet Status

The following table displays the meaning of values returned by the status method of the applet.

Applet Status Values and Meaning
Applet Status Applet Status Variable Value Meaning
LOADING 1 Applet is loading
READY 2 Applet has loaded completely and is ready to receive JavaScript calls
ERROR 3 Error while loading applet

Applet Event Handlers

You can register event handlers for various events. The Java Plug-in software will invoke these event handlers at various stages of the applet loading process. The following table describes applet events for which event handlers can be registered.

Applet Events
Applet Event When Event Occurs
onLoad Occurs when applet status is READY. Applet has finished loading and is ready to receive JavaScript calls
onStop Occurs when applet has stopped
onError Occurs when applet status is ERROR. An error has occurred while loading the applet

You can register or determine an event handler in the JavaScript code of a web page as shown in the following code snippets.

// use an anonymous function
applet.onLoad(function() {
  //event handler for ready state

// use a regular function
function onLoadHandler() {
  // event handler for ready state

// Use method form

// Use attribute form
applet.onLoad = onLoadHandler;

// get current event handler
var handler = applet.onLoad


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 446 / 159171686. Delta: 0.06344 с