By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,919 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,919 IT Pros & Developers. It's quick & easy.

reading multiple select

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.