Java Applet - returning information

Hi,
   Is it possible ( or easy ) to pass values back from an Applet into the HTML page it was called from? A friend is writing a colour picker which works really well... only he isn't sure how to make that available in the html page or if its even possible.... I don't know either so I thought I'd ask the gurus :)

thanks in advance!
LVL 1
petepalmerAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
Although it's easier to call public methods of the applet from JavaScript using a reference:

var applet = document.applets[0];
var x = applet.foo();

you can also do it the other way around:

http://www.rgagnon.com/javadetails/java-0172.html
http://www.apl.jhu.edu/~hall/java/JavaScript-from-Java.html
0
 
CEHJCommented:
Yes. You can call the applet from JavaScript and vice versa.
0
 
petepalmerAuthor Commented:
That's what I've been trying.... I'll go double check my code :)

hold the answers for now please :)
0
 
petepalmerAuthor Commented:
I had it right but the string I was trying to return was wrong....grrr...

oh well at least I knew I was on the right track after all. thanks CEHJ!
0
 
CEHJCommented:
8-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.