473,625 Members | 3,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reading multiple select

Hello,

I use a multiple select in a form in an asp page. When I go to the target
page, I want to be able to read out the items selected on the previous page.
How can I do that?

<form method="post" action="compare 1.asp" name="Compare">

<select name="motorcycl e" multiple size="20">

<%While not RSItems.eof%>
<option
value="<%=RSIte ms("ID")%>"><%= RSItems("Brand" )%>&nbsp;<%=RSI tems("Type")%>
<%
RSItems.movenex t
wend
%>

</select>
</form>

How can I read out the items selected?

Greetings Jochen
Jul 19 '05 #1
2 13468
CJM
http://rtfm.atrax.co.uk/infinitemonk...s/asp/983w.asp

hth

Chris

"jochen scheire" <jo************ @metamedia.be> wrote in message
news:Xm******** *************@p hobos.telenet-ops.be...
Hello,

I use a multiple select in a form in an asp page. When I go to the target
page, I want to be able to read out the items selected on the previous page. How can I do that?

<form method="post" action="compare 1.asp" name="Compare">

<select name="motorcycl e" multiple size="20">

<%While not RSItems.eof%>
<option
value="<%=RSIte ms("ID")%>"><%= RSItems("Brand" )%>&nbsp;<%=RSI tems("Type")%>
<%
RSItems.movenex t
wend
%>

</select>
</form>

How can I read out the items selected?

Greetings Jochen

Jul 19 '05 #2
Hi,

On the next page, you can request the selected value of the form element normally. You would get you value in a comma separated way, like Option2,Option4 ,....
Then split the string into an array and then iterate it on to the database....

mortorcycle = Request.Form("m otorcycle")
myArr = Split(motorcycl e,",")
for i = 0 to uBound(myArr)
....u can access the element by 'myArr(i)'
.........do what ever
Next

Bhaskardeep Khaund
Jul 19 '05 #3

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

Similar topics

6
4286
by: Ben Hallert | last post by:
Hi guys, I'm trying to figure out what bone headed mistake I made on something I put together. I've got a form (named 'context') that has a variable number of select-multiple inputs on it. Based on the number of variables passed through a GET string, I want to multiply the total number of selected items for each together to see how many possible combinations the selected items are generating. The following snippet of code...
4
5196
by: Phoebe. | last post by:
Hi, Good Day! Reading 1 excel file into a dataset is fine. How can I read multiple excel with the same data structure into 1 dataset? How can I append those data? Can someone help? Thanks in advanced. rgds,
2
3648
by: areef.islam | last post by:
Hi, I am kinda new to javascript and I am having this problem with selecting multiple options from a select tag. Hope someone can help me out here. here is my code /////////////////////////////////////////////////////////////////////////////////////// <form action="whatever.php" method="post"> <select name="zip_code" onchange="makeRequest('getCity.php?state='+this.form.zip_code.options.value)" multiple="multiple" size="20">
11
5130
by: downwitch | last post by:
Hi, I'm using a 3rd-party app's back end which stores SQL statements in a table, so I have no choice but to use dynamic SQL to call them (unless someone else knows a workaround...) Problem is, I can't get the statement to run properly, and I can't see why. If I execute even a hard-coded variation like DECLARE @sql nvarchar(MAX)
6
22516
by: =?Utf-8?B?UmljaA==?= | last post by:
'--this code works but only reads text into one column when contains multiple cols Dim ds1x As New DataSet Dim ConStr As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dir1A\;Extended Properties=""Text;HDR=No;FMT=Delimited\""" Dim conn1x As New OleDb.OleDbConnection(ConStr) Dim dax1 As New OleDbDataAdapter("Select * from testabc1x.txt", conn1x)
58
8054
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also the parts section an i seem to be having trouble. When i try to insert into the parts section i get the error Invalid character value for cast specification. But not sure what i am doing wrong. Here is what i am using to insert. All the sections...
482
27557
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. what i am trying to display previously entered multiple fields. I am able to get my serial fields to display correctly, but i can not display my parts fields correctly. Currently this is what it does serial information 1 parts 1
1
1609
Claus Mygind
by: Claus Mygind | last post by:
I want to loop through an options array of a multiple select list and identify each selected item. All the examples I can find seem to deal with only reading the first selected item. A simple loop example would be appreciated.
6
7554
by: phpnewbie26 | last post by:
My current form has one multiple select drop down menu as well as few other drop down menus that are single select. Originally I had it so that the multiple select menu was first, but this created the problem that when I went to select the other drop down menus, the selections i made on the multiple select one would clear. Then I had tried putting the multiple select menu last so that the selections wouldn't clear but then after clicking the...
0
8256
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8189
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8356
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4089
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2621
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
1803
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.