• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

APPLET-JAVASCRIPT Communication  RSS feed

 
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.
 
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
 
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).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!