Ask a Question related to ASP, Design and Development.
-
Simon Finn #1
Moving data between select boxes
Hi
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
request.form("Clients1").count
If i dont move the data i can retrieve it using:
request.form("Clients1").item(1)
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>
<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
(document.myForm.clients1[thisOption].text,
document.myForm.clients1[thisOption].value)
c1 = document.getElementById("clients1")
c1.options[thisOption] = null
}
if (action == 'del'){
c1 = document.getElementById("clients1")
c1.options[c1.options.length] = new Option
(document.myForm.clients2[thisOption].text,
document.myForm.clients2[thisOption].value)
c2 = document.getElementById("clients2")
c2.options[thisOption] = null
}
}
</SCRIPT>
</FORM>
Simon Finn Guest
-
Multiple select of list boxes
I am allowing my users to select multiple items in a list box, and I've set that up so it works swell. However, I'm unsure how to set each of the... -
Related Select Boxes - MX7
I have been having quiet some difficulties understanding the binding that has to be done to bind between one CFSELECT result and the bind to the... -
Cannot select graphic boxes
I cannot select graphic boxes on my document pages. I created the graphic boxes and text columns on the master pages. I set the graphic boxes to... -
dependent select boxes
Hello, as seen at: http://www.macromedia.com/support/dreamweaver/ts/documents/client_dynamic_listbo x.htm i'm using that script, the only... -
Fireworks HTML overlapping select boxes
I am using Fireworks HTML menus on my web pages. If a page has select boxes in it and the menus overlap, the menus appear behind the select boxes:...



Reply With Quote

