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 Displaying record from combo box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Displaying record from combo box" Watch "Displaying record from combo box" New topic
Author

Displaying record from combo box

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
Hi List[],

The values is populating in the combo box as i am populating the values in combo box from the database.But i want to get the all the records from the database on the basis of selecting the value in combo box.

Please help me how to do this.


Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60062
    
  65

Firstly, there is no such thing as a "combo box" in HTML. Please read this for more information.

Please explain what you are trying to do in more detail. It sounds like Ajax, not JSP, is what you will need.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
Actually i am getting the values in the select list from table.I want what ever the value i select in combo box its corresponding records will display in their respective text box.
e.g suppose i select ram values from the combo box and its corresponding records like full name, last name ,address etc should be display in their respective text box.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by pankaj semwal:
e.g suppose i select ram values from the combo box and its corresponding records like full name, last name ,address etc should be display in their respective text box.


1.once again not a combobox it is a dropdown list

2.please can you give the information that So far what do you try? where you get stuck? it will be useful to resolve your problem
[ December 09, 2008: Message edited by: seetharaman venkatasamy ]
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
Hi,
I am able to get the values in drop down list from the table.But i am
not able to understand how to get the related values when we select any value from the drop down list.
Example. suppose i have 3 values in the drop down box i.e 1,2,3
If i select value 2 then its corresponding records should display in the page
Please give some hint of code how to do this.

Thanks
Srikanth Nutigattu
Ranch Hand

Joined: Oct 30, 2007
Posts: 114
write a javasript function which will submit the form...
call the javascript function from the "onClick" event/onChange event (not sure which one)...

populate the table using JSP or servlet based on the request parameter from the page....

This is not an ajax solution but a normal request response solution... It will work!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying record from combo box
 
Similar Threads
Search Components on Client Screen
Struts Html select tag
populate a combo drop down box by using the values defined in a resource file
Selecting a value in a combo box that equals the value from the database record?
Urgent:: How to get values into a combo-box dynamically.......