Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

JavaScript calling java methods

Thread view: 
ezhilvel@gmail.com - 07 Mar 2008 05:57 GMT
Hi

Is there any possibility of javascript calling java methods.. it is
possible in case of java program using applet and even possible with
JSP. Is it possible to get on with the usual Java classes. Let me know
if thats possible..

Thanks..
GArlington - 07 Mar 2008 10:56 GMT
On Mar 7, 5:57 am, ezhil...@gmail.com wrote:
> Hi
>
[quoted text clipped - 4 lines]
>
> Thanks..

Yes.
You will have to load java class into javascript accessible DOM
though...
alexa.smith@gmx.net - 07 Mar 2008 13:30 GMT
On Mar 7, 6:57 am, ezhil...@gmail.com wrote:
> Hi
>
[quoted text clipped - 4 lines]
>
> Thanks..

Hi!

Yes it's possible.

For example you has a applet with tag name="MyApplet".
From JavaScript you can call the "public"-Method "public String
getAnything() {...}"  of the Applet with MyApplet.getAnything();

Important: Only the public Methods of your Applet-class are callable!

Give me feedback if it works!

regards
Alexa
Arne Vajhøj - 08 Mar 2008 00:15 GMT
> Is there any possibility of javascript calling java methods.. it is
> possible in case of java program using applet and even possible with
> JSP. Is it possible to get on with the usual Java classes. Let me know
> if thats possible..

Yes.

It is in the Java documentation.

For Java 1.5 -
http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/js_java.html

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.