File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes passing multiple values between listbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "passing multiple values between listbox" Watch "passing multiple values between listbox" New topic

passing multiple values between listbox


Joined: Oct 11, 2001
Posts: 3
Any one have any sample code in javascript of these requirements below?
What books has this level understanding how to complete these requirements?
1) two list box with arrows for all assign & unassign or one assign & unassign
2) ability to load list box on the right with values from xml file or database
3) move unique values selected one or more from right listbox to left listbox
4) remove unique values selected one or more from left listbox back to right listbox
5) exit button to exit
6) cancel button to not save
7) ok button to save values in left listbox to xml or database
Thank you,

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
First Off Scott, your name does not match Javaranch's naming policy....It should be a First and Last Name please change your display name by clicking the My Profile Link.
Now for my rant.....
Man this sounds like some homework to me or someone should be paying me to write the code for their job. Can this be done? Yes I have done it before with 5 hours of coding for my job.
Now for my hints:
Javascript can not save to xml or database so you need sever side language to do that.
If you can not figure out the cancel button then you need a lot more then books.
If you want help trying to figure stuff out.
Goto or and look for a double combo script. That will show you how to add items to a drop down.
To get values from a drop down you need to loop through the options and see if it is selected
var sel = document.pop.D1;
var txt = sel.options[i].text;
var opt = sel.options[i].value;
To move your items, you need to use buttons with onclick.

[ January 11, 2004: Message edited by: Eric Pascarello ]
I agree. Here's the link:
subject: passing multiple values between listbox
jQuery in Action, 3rd edition