This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Can I send servlet response to javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Can I send servlet response to javascript?" Watch "Can I send servlet response to javascript?" New topic

Can I send servlet response to javascript?

suchi patil

Joined: Feb 12, 2006
Posts: 3
Hello All Forumites,
I have javascript on html page which when loaded, sends parameters to servlet. Now I want to get the information/reply back from the servlet and update only particular area of the same html page where this information fetched needs to be displayed.
Is there any way to do this?
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
As far as I know, that's what AJAX is good for.

Moving to HTML and JavaScript...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
or iframes.

Life called,so here I am.<br />Cheers<br />Niki.:-)
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Here's an AJAX faq:

There is no emoticon for what I am feeling!
I agree. Here's the link:
subject: Can I send servlet response to javascript?
It's not a secret anymore!