Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to request a javascript var. for use in db query  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In an employe creation form, the user need to type in his/hers postalcode. I have defined a table where I store postalcodes and its associated cities.
When the user type in the postalcode, the textfield "city" should automaticly update itself to the appropiate city.
At the moment I'm apple to copy the postalcode typed in "postalcode", to the field "city", by the use of a javascript. This is run when the user exits the field "postalcode" (onBlur).
As I see it I need to create a variable to use in .jsp, then run my Postalcode query whit this appropiate variable value.
How do I make the query update itself without submitting the form (creating the user) ???
I would really appriciate the help, or inspiration anyone could add :-)
Best regards
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!