loadPCCommandApplet( callback )



This function is the starting point for usage of the applet. A call to it is required before any other actions can be performed. For example, it could be called in the "onload" event of a screen. The function loads the applet into your page.

The "callback" parameter is optional, but it is recommended that you use it. The parameter accepts the name of a JavaScript function (in string format) that the applet will call when it is loaded and ready to go.

This is very useful to prevent the user from attempting to use the applet before it has finished loading in the browser.

For example, your callback function may enable a button that the user can then click on to launch an action.

Once this call completes successfully and your callback has been invoked, it is safe to start using the other functions.

Security Warnings:

Since the applet attempts to run in "trusted" mode, the end-user must confirm trust of the applet and allow it to run. Ā It is normal that the user will see this dialog on the first run of the applet:

The user must click the "Run" button to trust Profound Logicā€™s digital signature and allow access.

If the users do not wish to see this dialog each time the applet is used, they can check the box "Always trust content from this publisher".

Example:

In this example, the applet will be loaded and it will call JavaScript function myFunc() (if defined) when the applet has finished loading.

loadPCCommandApplet("myFunc");