I am new in JavaScript. I want to know how to call a simple method in Java file from JavaScript program. Could you please give me a simple example as well?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Javascript will not be able to access server side java code directly.
It will need to make an ajax call to access a method or make a http call.
If you have applets you will be able to access the applet java code.
See example here
http://download.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/js_java.html