Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display database data in textboxes on the basis of one textbox value.

 
Aditi Joshi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone help me in displaying employee details after i enter emp_id in first text box.

And employee details should come in other text boxes on same jsp page.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP will be of no help for this. Fire off an Ajax request that will return the data.
 
Aditi Joshi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allright ! Thanks.
 
Mukesh Negi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aditi Joshi wrote:Hi,

Can anyone help me in displaying employee details after i enter emp_id in first text box.

And employee details should come in other text boxes on same jsp page.

Thanks in advance.


Hi Aditi. You can do it using JSP as well. But you have to first decide wheather you have to send the request synchronously or asynchronously(using ajax).

If you decide to send synchronously you can send request to the same jsp file and depending on some condition you can show the details of the employee.

But I'l suggest you to send it asynchronously using Ajax.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mukesh Negi wrote:You can do it using JSP as well.

This cannot be done purely with JSP as there is no way to detect when the request is to be fired off; unless you do something silly like require the user to click a submit button after entering the original data.
 
Jayesh A Lalwani
Rancher
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean like google used to do until umm one year ago?

Asking user to hit the submit button might be all 20th century. But, it's hardly silly
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic