473,498 Members | 1,648 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="compare1.asp" name="Compare">

<select name="motorcycle" multiple size="20">

<%While not RSItems.eof%>
<option
value="<%=RSItems("ID")%>"><%=RSItems("Brand")%>&n bsp;<%=RSItems("Type")%>
<%
RSItems.movenext
wend
%>

</select>
</form>

How can I read out the items selected?

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

hth

Chris

"jochen scheire" <jo************@metamedia.be> wrote in message
news:Xm*********************@phobos.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="compare1.asp" name="Compare">

<select name="motorcycle" multiple size="20">

<%While not RSItems.eof%>
<option
value="<%=RSItems("ID")%>"><%=RSItems("Brand")%>&n bsp;<%=RSItems("Type")%>
<%
RSItems.movenext
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("motorcycle")
myArr = Split(motorcycle,",")
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
4265
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. ...
4
5181
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...
2
3629
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...
11
5115
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...
6
22481
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...
58
8013
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...
482
27248
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. ...
1
1603
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...
6
7535
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...
0
7005
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...
0
7168
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,...
0
7210
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...
0
7381
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...
1
4916
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4595
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
3096
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
1424
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
659
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.