• Post Reply Bookmark Topic Watch Topic
  • New Topic

Update/Insert into Database from listbox

 
m brymer
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am hoping that someone can point me in the right direction...Here is my situation: I have two multi-select listboxes on a jsp page. The first box is a list from a lookup table, the second box are the choices previously made by the user and stored in a database. What I am trying to do is update the database with the new selections made in the second box (this would include additions and deletions). How do I capture what is in the second box? Any suggestions, ideas, sample code?
Thanks!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The folks in the Javascript forum would probably be able to answer this better than we could. It has nothing to do with the serverside (JSP) end of things.

It's not difficult to move options from one list to another before submitting a form.
 
m brymer
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Ben!
 
pradeep jaladi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Using any scripting language add the listbox variables selected into the vector or arraylist adn send it to the DataBase class what u desire. or while(vector(0) --- vector(last Element) ) iterate and do neccessary action tot he database
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!