• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Display department in textbox2 to corresponding employee in textbox1 in servlet & jsp

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am stuck in a project in jsp itself.This is a servlet & jsp project.
I have to display two text boxes in jsp page where one text box contains employee name & on the movement to 2nd text box (by onblur() of javascript)) his corresponding department should be displayed automatically. There are 2 tables named emp(emp_id,emp_name,dept_id(as foreign key)) and table dept(dept_id,dept_name).In 2nd text box dept_name should come automatically.

Help is appreciable. Thanking you.
Posts: 67449
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you obtain the first value, you can use it to make an Ajax call back to the server to retrieve the additional information to display.

Using jQuery to help with the Ajax would make this just a few lines of code.
Poop goes in a willow feeder. Wipe with this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic