|
Author |
Topic: java-javascript problem (Read 301 times) |
|
pinksalmon
|
java-javascript problem
« on: Feb 3rd, 2003, 1:53pm » |
|
I'm trying to communicatie between java and javascript. I want to enter a method from JS. But I only seem to get into the method when its name is "s1" every other name gives an error, but even then it's not working seamless either. This is my code (I'm using alpha 49 if that's relevant) java: String myString; public void init() { myString = new String("Hello, world!"); } public void paint(Graphics g) { g.drawString(myString, 25, 20); } public void setString(String aString) { myString = aString; repaint(); } javascript: <INPUT TYPE="button" VALUE="Set String" onClick="document.sinApp.setString(String(document.adjust.str.value))"> Does anybody know where to get some decent info on communication between java and javascript, by the way?
|
|
|
|
|