473,568 Members | 2,986 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("C lients1").item( 1) and it will not show up using
request.form("C lients1").count

If i dont move the data i can retrieve it using:
request.form("C lients1").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="SaveITS kills.asp">
<SELECT id=clients1 style="WIDTH: 160px; COLOR: black; HEIGHT: 266px"
multiple size=5 name=clients1>< %=optionStr%></SELECT>
<INPUT onclick="moveIt ('del',document .myForm.clients 2.selectedIndex )"
type=button value="Include" style="WIDTH: 61px; HEIGHT: 22px" size=51>
<INPUT onclick="moveIt ('add',document .myForm.clients 1.selectedIndex )"
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=JavaSc ript>
function moveIt(action, thisOption){
if (thisOption == -1){
return false;
}
if (action == 'add'){
c2 = document.getEle mentById("clien ts2")
c2.options[c2.options.leng th] = new Option
(document.myFor m.clients1[thisOption].text,
document.myForm .clients1[thisOption].value)
c1 = document.getEle mentById("clien ts1")
c1.options[thisOption] = null
}
if (action == 'del'){
c1 = document.getEle mentById("clien ts1")
c1.options[c1.options.leng th] = new Option
(document.myFor m.clients2[thisOption].text,
document.myForm .clients2[thisOption].value)
c2 = document.getEle mentById("clien ts2")
c2.options[thisOption] = null
}
}
</SCRIPT>
</FORM>
Jul 19 '05 #1
0 1826

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

Similar topics

6
9461
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 using a nested sub-query to calculate the moving average, but I'm having difficulty selecting exactly 18 data points (ie When I include the 'HAVING...
10
19322
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 able to fill that one out just fine. The second form is multipart/form-data. Unfortunately, I haven't been able to fill that out in a way that makes...
5
4212
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); System.Data.SqlClient.SqlCommand dbCommand1 = new System.Data.SqlClient.SqlCommand();
7
4203
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 (DataBindings). - When I display a record and then try to access the .Text property of one of the text boxes on any tab except the current tab, the result...
3
2230
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 buttons to allow the user to add, update, and delete a row in the grid. I have an event on cell changed associated with the grid that updates the...
0
1834
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 the country. allows you to easily obtain no obligation moving quotes from local movers, long distance movers, international movers, auto transport,...
0
1765
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 the country. allows you to easily obtain no obligation moving quotes from local movers, long distance movers, international movers, auto transport,...
3
1478
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 subsequent year and recalculate the dates so that each year it is referenced to the first available business day of any given week. This is done by...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3651
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
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 we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.