Hi
Im trying to pass a String from a javascript function to an Applet.
I cant figure out why it does not work..
It looks like this:
Script:
document.theApplet.aFunction("some text"
and Applet:
public void aFunction(String text)
{
System.out.println("Applet: got text:"+text);
repaint();
}
Then I got a Java.lang.Exception error: aFunction{0}:There is no such method.
But if I do like:
Script:
document.theApplet.aFunction();
and Applet:
public void aFunction()
{
System.out.println("Applet: got text!"
repaint();
}
Then I got the correct response: Applet: got text!
Im trying to pass a String from a javascript function to an Applet.
I cant figure out why it does not work..
It looks like this:
Script:
document.theApplet.aFunction("some text"
and Applet:
public void aFunction(String text)
{
System.out.println("Applet: got text:"+text);
repaint();
}
Then I got a Java.lang.Exception error: aFunction{0}:There is no such method.
But if I do like:
Script:
document.theApplet.aFunction();
and Applet:
public void aFunction()
{
System.out.println("Applet: got text!"
repaint();
}
Then I got the correct response: Applet: got text!