File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Display database data in textboxes on the basis of one textbox value. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Display database data in textboxes on the basis of one textbox value." Watch "Display database data in textboxes on the basis of one textbox value." New topic
Author

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

Aditi Joshi
Greenhorn

Joined: Aug 03, 2012
Posts: 4
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

Joined: Jan 10, 2002
Posts: 60077
    
  65

JSP will be of no help for this. Fire off an Ajax request that will return the data.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Aditi Joshi
Greenhorn

Joined: Aug 03, 2012
Posts: 4
Allright ! Thanks.
Mukesh Negi
Greenhorn

Joined: Jul 25, 2012
Posts: 17
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

Joined: Jan 10, 2002
Posts: 60077
    
  65

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
Bartender

Joined: Jan 17, 2008
Posts: 2065
    
  22

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display database data in textboxes on the basis of one textbox value.
 
Similar Threads
in dropdown problem
Capturing a list of details from the UI to ActionForm
employee system
vectors
How to set a radio button selected from a JSP page, with the help of values extracted from database?