Ok, I have a list with 12 states on the left, its a switch box so you can swith the names to the right. Now what I am trying to do is when a user makes the selections they want, they stay in the box on the right, can someone help me with this script? Also it will be published on the web, they would be making the changes from a web page, any help or Ideas would be much appreciated. Here is the code I have now.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML><HEAD>
<FORM
action=
method=post>
<META http-equiv=Content-Type content=”text/html; charset=windows-1252″>
<SCRIPT language=JavaScript>
<!– Begin
function move(fbox, tbox) {
var arrFbox = new Array();
var arrTbox = new Array();
var arrLookup = new Array();
var i;
for (i = 0; i < tbox.options.length; i++) {
arrLookup[tbox.options[i].text] = tbox.options[i].value;
arrTbox[i] = tbox.options[i].text;
}
var fLength = 0;
var tLength = arrTbox.length;
for(i = 0; i < fbox.options.length; i++) {
arrLookup[fbox.options[i].text] = fbox.options[i].value;
if (fbox.options[i].selected && fbox.options[i].value != “”) {
arrTbox[tLength] = fbox.options[i].text;
tLength++;
}
else {
arrFbox[fLength] = fbox.options[i].text;
fLength++;
}
}
arrFbox.sort();
arrTbox.sort();
fbox.length = 0;
tbox.length = 0;
var c;
for(c = 0; c < arrFbox.length; c++) {
var no = new Option();
no.value = arrLookup[arrFbox[c]];
no.text = arrFbox[c];
fbox[c] = no;
}
for(c = 0; c < arrTbox.length; c++) {
var no = new Option();
no.value = arrLookup[arrTbox[c]];
no.text = arrTbox[c];
tbox[c] = no;
}
}
// End –>
</SCRIPT>
<META content=”MSHTML 6.00.2726.2500″ name=GENERATOR></HEAD>
<BODY><FORM name=”combo_box”>
<TABLE>
<TBODY>
<TR>
<TD><SELECT style=”WIDTH: 150px” multiple size=10 name=list1> <OPTION
value=12>Alabama</OPTION> <OPTION value=54>Alaska</OPTION> <OPTION
value=65>Arizona</OPTION> <OPTION value=45 selected>Arkansas</OPTION>
<OPTION value=2>California</OPTION> <OPTION value=6>Colorado</OPTION>
<OPTION value=81>Connecticut</OPTION> <OPTION value=5>Delaware</OPTION>
<OPTION value=23>District of Columbia</OPTION> <OPTION
value=58>Florida</OPTION> <OPTION value=87>Georgia</OPTION> <OPTION
value=98>Hawaii</OPTION></SELECT> </TD>
<TD vAlign=center align=middle><INPUT onclick=move(this.form.list2,this.form.list1) type=button value=”<<“>
<INPUT onclick=move(this.form.list1,this.form.list2) type=button value=”>>”>
</TD>
<TD><SELECT style=”WIDTH: 150px” multiple size=10 name=list2></SELECT>
</TD></TR></TBODY></TABLE></FORM>
<P>
<P><!– Script Size: 4.75 KB –></P></BODY></HTML>