| Java menu knowledge base Exposed methods
Exposed Methods & Remote Controls
Exposed methods are a way to use a remote source to control what happens in the applet.
Many of our applets now have dozens of exposed methods. These can be
used, for example, for modifying applet content at runtime, or querying the
state of the menu. Using exposed methods you can use the applet has an
integral element of your own programmatic web interface and connect it
up to your own programmes and scripts. For an example of an applet
with a lot of exposed methods, iTree Pro-XQ Powertree's exposed
methods are listed here.
List of exposed methods
The lists of exposed methods are in the applet documentation, not on this page!
Look at the homepage for the applet in question and find the section which
says something like "how to use this menu" or "instructions". In that section you
may find a hyperlink marked "exposed methods". Most of our applets (particularly the
more up-market ones) have such a list.
Instructions for accessing exposed methods
- Give your applet a name in the applet tag (e.g. NAME=myApplet)
- In your javascript, use the code document.myApplet.method();, where
method() should be replaced by the name of the exposed method you are accessing.
- Never try to access an exposed method before the applet has
properly loaded. Do not access exposed methods in onLoad scripts. If
the applet has not finished loading, the value of document.myApplet is
null - advanced script writers may like to exploit this to their advantage.
Notes
- The Mac MRJ (on Internet Explorer) does not support any form
of interaction between java and javascript.
|
|