We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Java & Javascript Integration
Page Index Toggle Pages: 1
Java & Javascript Integration (Read 710 times)
Java & Javascript Integration
Nov 14th, 2006, 3:58pm
 
Hi!

I've recently discovered that you can access public methods and variables from java applets for use in html forms and javascript functions. Apparently you can call these functions and variables straight from the html page in the following way provided that they are declared public in the java applet:

document.myAppletName.myFunctionName();
document.myAppletName.myVariableName;

For more info see:
www.csc.liv.ac.uk/~avf/comp519/NOTES/JSJ.ppt

I have tried to do this with a processing applet, but the function call fails from Javascript. Is there anything else I might have to do to my processing applet to make it work in the same way as an ordinary java applet?

I hope someone has tried this before who might be able to help..... Thanks in advance
Page Index Toggle Pages: 1