Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

APPLET-JAVASCRIPT Communication

 
Sriram Sankar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have application where we need to do lots of client side validation and our client application is built completely in JAVA SWING, is there a way to execute JAVASCRIPT validation within a event triggered by an applet.
thanks,
Sriram.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sriram,
I know that Netscape provides a JSObject class that will let your applet communicate with JavaScript on the page it is in... I personally don't know that much about it, though, so you will have to go to Netscape to look for more information on it...
HTH,
-Nate
 
Peter Gragert
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo,
Its definitely possible at least with IE5 do interact applets with java script.
I have at least one example from Prof. D. Eck.
GummyGraph applet:
Here a short impression:< SCRIPT >
<!--
function getGraphPoints() {
var ct = document.graphApplet.getPointCount();
var str = "Graph has " + ct + " points.\n\n";
for (var i = 0; i < ct; i++) {
str = str + "For x = " + document.graphApplet.getX(i) + ", y = " +
document.graphApplet.getY(i) + " and dy/dx = " +
document.graphApplet.getDerivative(i) + "\n";
}
document.control.pointDisplay.value = str;
}
// -->
Contact me if you are interested in full source code and please refer to this 'reply' such that I know ... .
Peter
[This message has been edited by Peter Gragert (edited March 03, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic