aspose file tools*
The moose likes Servlets and the fly likes populating text box when selecting value in drop down box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "populating text box when selecting value in drop down box" Watch "populating text box when selecting value in drop down box" New topic
Author

populating text box when selecting value in drop down box

Nidhi Singhal
Ranch Hand

Joined: Sep 19, 2004
Posts: 89

Hi

I am facing the following problem...
I have a servlet with a drop down select box and a text box... When ever a user selects any value in the select box..i want to fetch the corresponding value in the text box from the database.... (without submitting the form)...i am able to fetch the selected value using javascript....but i don't want to use java script for fetching the corresp value from the database (as it being client side scripting)...
plz suggest a possible solution...in case...

thanx..
Nidhi
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

but i don't want to use java script for fetching the corresp value from the database


That's good because you can't. You will need to make a server round trip to fetch any info from a database.

You say you do not want to submit the form, but you must submit something. It's the only way to communicate back to the server.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: populating text box when selecting value in drop down box