This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

populating text box when selecting value in drop down box

 
Nidhi Singhal
Ranch Hand
Posts: 89
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic