• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

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!
0
petepalmer
Asked:
petepalmer
  • 3
  • 2
1 Solution
 
CEHJCommented:
Yes. You can call the applet from JavaScript and vice versa.
0
 
CEHJCommented:
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
 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now