470,591 Members | 2,083 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

Moving data between select boxes


I have used ASP code to load data into two select boxes. The code below is
used to move the selected data back and forth between the boxes.

I am having problems retreving the data from the boxes after the user has
moved any of the data:

If the data has been moved by the below code; when i try and load the data
back into the database i cannot retrieve the data using:
request.form("Clients1").item(1) and it will not show up using

If i dont move the data i can retrieve it using:

This is confusing me some what, any help would be great.

Thanks Si.

Here is my code:

<FORM id="myForm" name="myForm" method="post" action="SaveITSkills.asp">
<SELECT id=clients1 style="WIDTH: 160px; COLOR: black; HEIGHT: 266px"
multiple size=5 name=clients1><%=optionStr%></SELECT>
<INPUT onclick="moveIt('del',document.myForm.clients2.sel ectedIndex)"
type=button value="Include" style="WIDTH: 61px; HEIGHT: 22px" size=51>
<INPUT onclick="moveIt('add',document.myForm.clients1.sel ectedIndex)"
type=button value="Exclude" style="WIDTH: 61px; HEIGHT: 22px" size=52>&nbsp;
<SELECT id=clients2 style="WIDTH: 160px; COLOR: black; HEIGHT: 264px"
multiple size=5 name=clients2><%=option2Str%></SELECT>
<INPUT type=submit value=Save name=Save action="myform.submit();">
<SCRIPT language=JavaScript>
function moveIt(action, thisOption){
if (thisOption == -1){
return false;
if (action == 'add'){
c2 = document.getElementById("clients2")
c2.options[c2.options.length] = new Option
c1 = document.getElementById("clients1")
c1.options[thisOption] = null
if (action == 'del'){
c1 = document.getElementById("clients1")
c1.options[c1.options.length] = new Option
c2 = document.getElementById("clients2")
c2.options[thisOption] = null
Jul 19 '05 #1
0 1726

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Stephen Miller | last post: by
10 posts views Thread by Gregory A Greenman | last post: by
5 posts views Thread by Vigneshwar Pilli via DotNetMonster.com | last post: by
7 posts views Thread by Andrew McKendrick | last post: by
3 posts views Thread by Ctal | last post: by
reply views Thread by linkswanted | last post: by
reply views Thread by linkswanted | last post: by
3 posts views Thread by c0l0nelFlagg | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.