var recipientList = document.getElementById("lstRecipients");
var memberList = document.getElementById("lstMembers");
var addIndex = memberList.selectedIndex;
if(addIndex < 0)
I have a removeRecipient function which reverses this process, putting selected items from the left listbox back into the list on the right.
However, in some scenarios I might end up inserting a username in the left hand listbox, without using these buttons, and it might appear in both list boxes. This I dont mind, but what I need to know is, when I use the remove button which calls the removeRecipient function to put the user back on the right hand listbox, I want to first check if this username (and underlying value) already exists in the right hand listbox, and if it does, simply remove it from the left listbox, so I dont end up with duplicates in the Right listbox.
Is there a way I can check for the existance of the left hand side selected listbox item within the right hand side listbox, so I can take the appropriate action from there?
Thanks in advance...