aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to return just the value not whole HTML? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to return just the value not whole HTML?" Watch "How to return just the value not whole HTML?" New topic
Author

How to return just the value not whole HTML?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I am reading HRA (Head Rush Ajax) and unfortunately they have used PHP as server side technology.

I am confuse with this point.

Server returns the response (just the value not the whole HTML) and browser puts that into request's responseText property and we can get it in JS function.

First, how to return just the value from servlet???

Second, how can I return multiple values if I want???

I hope my questions are clear.
[ September 27, 2006: Message edited by: rathi ji ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Don;t put HTML on the page, just the code you want to return.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

A servlet can return any data you want, not just an HTML page.

It can return a JSON structure for example, which can contain as much information as you like and is easily evaluated in the Javascript.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Thanks Eric and Bear.

I am able to do it.



Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to return just the value not whole HTML?