This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSP and the fly likes How to request a javascript var. for use in db query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to request a javascript var. for use in db query" Watch "How to request a javascript var. for use in db query" New topic
Author

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

mlo
Greenhorn

Joined: Sep 09, 2002
Posts: 1
.JSP
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
Michael
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to request a javascript var. for use in db query