Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying record from combo box

 
pankaj semwal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65221
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
pankaj semwal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic