IntelliJ Java IDE
The moose likes Applets and the fly likes APPLET-JAVASCRIPT Communication Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "APPLET-JAVASCRIPT Communication" Watch "APPLET-JAVASCRIPT Communication" New topic
Author

APPLET-JAVASCRIPT Communication

Sriram Sankar
Greenhorn

Joined: Mar 01, 2001
Posts: 22
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

Joined: Oct 18, 2000
Posts: 4120

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


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 421
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).]
 
IntelliJ Java IDE
 
subject: APPLET-JAVASCRIPT Communication
 
Threads others viewed
when do we use swings
client side validation vs server side validation
JavaScript disabled
Http Long polling
Calling Java Method from java Script using IE.5(Urgent)
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture