JonFleming
asked on
Javascript: user adding items to a predefined dual select box
I'm setting up a form for users to submit our papers/presentations to a database. One item is a list of authors. all papers will be authored by at least one and perhaps several of a predefined list of names (our employees). But some of them will include someone from outside our organizatIon, and I need to accommodate that possibility. So the user has to be able to add an arbitrary item to the list of authors. And ther ehave to be "Move up" and "Move down" buttons because the user isn't necessarily going to add then names in the correct order.
I've found some javascript that can do almost all that I want except for adding a name, at http://www.applicationgroup.com/tutorials/DualListBox/DualListBox_js.asp. I'm no javascript expert, but I can hack some code to support an "Add a Name" button. But I thought I'd ask to see if someone has such code lying around in the pile ...
I've found some javascript that can do almost all that I want except for adding a name, at http://www.applicationgroup.com/tutorials/DualListBox/DualListBox_js.asp. I'm no javascript expert, but I can hack some code to support an "Add a Name" button. But I thought I'd ask to see if someone has such code lying around in the pile ...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ah, thank you.
function Add()
{ var list = document.getElementById("c
var newAuthor = document.getElementById("t
if (newAuthor != "")
{ var option = new Option(newAuthor, newAuthor)
list.options[list.options.
}
}