• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to add multiple selection from dropdown list

 
ketandba shah
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new in jsp. can any body give me an idea how i can add multiple selection from dropdown and added this multiple selection in one int field of database...

e.g. drop down contens 0|1|2|3|4|5|6|7....

user has selected 3|5|6|7
added into database as 3|5|6|7 as per multiple selection.

Thanks in advanced...

ketan
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, you can't choose multiple selections from a dropdown. If however, you make the <select> element a list, you can get multiple selections.

In this case, you would use request.getParameterValues() to retrieve a String array of all the selected values.

The rest of the coding is up to you. Check back in with your code and any problems you might be having.
[ June 02, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!