Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing multiple values between listbox

 
sa_prog
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Any one have any sample code in javascript of these requirements below?
Or
What books has this level understanding how to complete these requirements?
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,
Scott
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 http://www.dynamicdrive.com or http://www.JavaScriptKit.com 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.

Eric
[ January 11, 2004: Message edited by: Eric Pascarello ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic