473,503 Members | 3,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>&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
(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>
Jul 19 '05 #1
0 1823

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
9455
by: Stephen Miller | last post by:
Firstly, sorry for the long post, but I've included a fair bit of sample data. Im doing a comparision of 10yr Bond prices and CPI adjustments, with an 18 week moving average of the CPI. I'm...
10
19307
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
5
4204
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
7
4195
by: Andrew McKendrick | last post by:
Hi, I've noticed a bug in VB.NET (latest .NET Framework)... - I have a TabControl on a form with several tabs. - Each tab contains text boxes that are bound to fields in a data source...
3
2223
by: Ctal | last post by:
I have an app that populates several data tables on load. Each of these are bound to a datagrid. Above each datagrid I have several text boxes that display the data for the active row. There are...
0
1828
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
0
1763
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
3
1468
by: c0l0nelFlagg | last post by:
I have a moving dispatcher database. There are 99 drivers, 99 loaders, and 50 different vehicles. The scheduler database is built on a 13 4 week month year so that it can be used repeatedly in any...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.