wood burning stoves 2.0*
The moose likes Servlets and the fly likes Combo boxes and servlets - Pls Help 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 » Servlets
Bookmark "Combo boxes and servlets - Pls Help" Watch "Combo boxes and servlets - Pls Help" New topic
Author

Combo boxes and servlets - Pls Help

kripa ganesh
Greenhorn

Joined: Nov 01, 2001
Posts: 8
Hello all,
Am struck in the middle of a project. i use Mysql, tomcat3.2.1 on win 98.
Actually the requirement is that, data from a field in a mysql table needs to be read and displayed within a combo box. no idea as to what should be done..pls help.
the combo that displays the field from a table will be used to select options in a html file and the option thus selected got to be stored back into another table
eg: Product category - say..Grocery, Cosmetics
Product name - Spices, Perfume...
So if a user is going to add he/she should select from the predefined category Grocery, cosmetics etc. Then the user will enter the specific prod name into a text field...
mahadevan raja
Ranch Hand

Joined: Apr 11, 2001
Posts: 96
hello gk,
as far as i have understood,i think u want to display contents in a combo box dynamically.isnt it?
in the loop where u check whether the resultset is null ,get the data from the table and put it in the option tag.i.e before the loop give the select open tag.in the loop give one option tag and get the string from resultset,after the loop end the select tag.
try it out and reply.
good luck


SPECIALIST-WCSV5.1 Implementation.<br />SYSTEMS EXPERT-WAS4.0 Administration
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
g k,
Javaranch has a policy on valid display names. Please read the naming policy and change your display name to one that conforms with the policy. Thanks.


Matthew Phillips
 
Consider Paul's rocket mass heater.
 
subject: Combo boxes and servlets - Pls Help
 
Similar Threads
Urgent pls Help!!!
Finding rows in a specific column of a given table
Storing orders using product id fields
Urgent:: How to get values into a combo-box dynamically.......
Storing orders using product id fields