| Author |
Reading from database and putting into Combo Box
|
Ben Reeves
Greenhorn
Joined: Jan 23, 2006
Posts: 5
|
|
Hey, Sorry for disturbing you but im having problems trying to get data from a mysql database and displaying it in a combo box on a jsp page. I had a look at some sample code you gave on the forums, but im still not sure. Im doing an airline booking system. I want to get the list of origins from my database and put it in a combobox on my jsp. then i have a combo-box which should have a list of destinations which changes depending on the origin selected from the drop down list. Im really stuck with this, could you please help me??? Thanks,
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
Where is the problem? - In retrieving the data from DB - In filling the combo box with that data - filtering the other combo based on origin combo
|
 |
Ben Reeves
Greenhorn
Joined: Jan 23, 2006
Posts: 5
|
|
|
At the moment its filling the combo box with data. I know how to retrieve data from a table. Would i need to put all the code on the jsp or can i put it in the java class?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56226
|
|
|
Most definitely not in the JSP.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56226
|
|
Similar previous topics: http://www.coderanch.com/t/288857/JSP/java/Populating-html-select-tag-without http://www.coderanch.com/t/285869/JSP/java/Map-Dropdown-JSTL-EL
|
 |
 |
|
|
subject: Reading from database and putting into Combo Box
|
|
|