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

calling java files from java script

 
aayushpatel
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i call java files from java sctipt..suppose i have one button on html page..how can i call java file on pressing that button
 
John Smith
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use an applet to call the java classes
//syntax might be incorrect
<script>
function doit(){
appletframe.applets[0].callClassMethod();
}
</script>
<html>
<input type="submit" value="click" on_Mouse_Over="doit()">
</html>
||
The applet could return an object
var object = appeltframe.applets[0].getObjecctMethod();
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Your name aayushpatel doesn't conform to the Java Ranch naming convention. Please read the naming convention:
http://www.javaranch.com/name.jsp
Please re-register with a valid name.
Thanks,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic