So, this issue has been discussed a bit here
http://processing.org/discourse/yabb2/YaBB.pl?num=1190848859 but I was unable to solve me problems. Essentially, my issue is the same: I have created an applet (in Eclipse), deployed a jar which I packaged with the core library from Processing and, though I can make calls from the Applet to the javascript functions in the page, I can not go in the other direction.
Since I am already a bit familiar with JQuery and Prototype, both of which I am making use of in page for various reasons, I tried using selectors to get at the object but to no effect. Initially, I had been using the html as Processing had rendered it -- using <object> tags -- but have since tried <applet> tags. While both rendered, neither worked.
The function that I am trying to access is within the main class -- called squaresApplet -- which extends PApplet.
What on earth can I do to solve this? I realize that I could simply construct a button in processing .. but that's not nearly as elegant.
For reference, the java, html and javascript code. The function I want to call is called 'reset()'.