|
Author |
Topic: applet and javascript (Read 359 times) |
|
eskimoblood
|
applet and javascript
« on: Jan 5th, 2005, 3:00pm » |
|
I try do call a methode in the applet via javascript. These is the code of my applet: Code: int cnt=0; void setup(){ size(700,300); textFont(loadFont("Trebuchet_MS.vlw")); } public void test(){ cnt++; background(25); fill(0); text(cnt,20,20); } |
| These is my javascript function: Code: function click() { document.theApplet.test(); } |
| But whenever I call the javascript these error appears: document.theApplet.test is not a function
|
« Last Edit: Jan 5th, 2005, 3:02pm by eskimoblood » |
|
|
|
|
fjen
|
Re: applet and javascript
« Reply #1 on: Jan 5th, 2005, 4:56pm » |
|
i only got it to work when the name of the applet is equal to the class-name: <applet name="abc" class="abc" archive="abc.jar" ... see here: http://www.florianjenett.de/p55/js_example/ sadly i still can't see your applets with safari ... good luck! /F
|
|
|
|
eskimoblood
|
Re: applet and javascript
« Reply #2 on: Jan 6th, 2005, 11:20am » |
|
Thanks. The name tag was it.
|
|
|
|
|