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

Combo boxes and servlets - Pls Help

 
kripa ganesh
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic