File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes how to call java method in java script and return type should be setted as title Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to call java method in java script and return type should be setted as title" Watch "how to call java method in java script and return type should be setted as title" New topic
Author

how to call java method in java script and return type should be setted as title

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
can any one give information on how to call java method in java script and return type from that method should be setted as title for the html.
code snippets do that.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 865
    
    5
Are you talking about an applet? Its public methods are available to javascript.
anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
i want to call in html ,i am using java 1.6.is it possible to call in scriplet of html
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

To call back to the server requires the use of Ajax.

Using jQuery (recommended), it as easy as: $('title').load('/path/to/servlet');

The servlet should return the text to be inserted into the title element.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

P.S. If you don't understand why you can't just call a Java method from the browser, please read this article to understand how JSP operates and why you can't do that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to call java method in java script and return type should be setted as title
 
Similar Threads
Quick Question
INSERT THE VALUE OF A FORM FIELD INTO A JAVA STRING (without page refresh)
Creating a masked popup in JavaScript
how to get the return value from java method by shell script
How to define focus() method in JS