469,917 Members | 1,784 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

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 12575
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ben Hallert | last post: by
2 posts views Thread by areef.islam | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.