Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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
  • 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: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic