Here's a little something I threw together for you Dany -- you said you were using ASP so this does it using server side VBScript
Tom
Code:<%@ Language=VBScript %> <HTML> <HEAD> </HEAD> <BODY> <% dim MySelections dim MovedSelections redim MovedSelections(0) myselections = split(request.form("lst1"), ",") %> <form name=form1 method=post> <P> <SELECT name=lst1 multiple=true> <% Call CheckForOption("TOM") call CheckForOption("BOB") %> </SELECT> </P> <P> <SELECT name=lst2 multiple=true> <% Call ListMovedOptions %> </SELECT> </P> <INPUT TYPE=SUBMIT> </form> </BODY> </HTML> <% Sub CheckForOption(OptionName) dim bFound dim I bfound = false if ubound(myselections) >= 0 then for I = 0 to ubound(myselections) if ucase(trim(myselections(I))) = ucase(trim(optionname)) then bFound = true exit for end if next end if if bfound = false then response.write "<OPTION>" & OptionName & "</OPTION>" else redim preserve movedselections(ubound(movedselections) + 1) movedselections(ubound(movedselections)) = OptionName end if end sub Sub ListMovedOptions dim I for I = 1 to ubound(movedselections) response.write "<OPTION>" & movedselections(i) & "</OPTION>" next end sub %>




Reply With Quote