FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   java-javascript problem
« Previous topic | Next topic »

Pages: 1 
   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?
 
Martin

122417302122417302martingomez_listsmg1ph WWW Email
Re: java-javascript problem
« Reply #1 on: Feb 3rd, 2003, 5:18pm »

http://www.newarchitectmag.com/archives/1996/10/husain/
http://www.futuredesigners.com/level2/workshopjava/ch16.htm
 
google 'combining javascript and java'
 
Pages: 1 

« Previous topic | Next topic »