Have a look at the following page from Oracle's Tutorial: Invoking Applet Methods From JavaScript Code (The Java™ Tutorials > Deployment > Java Applets)