|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
freeaspupload: retrieving multiple values from a select field
I'm having problems retrieving all the values from a multiple selection field using the freeaspupload component.
I'm creating an online email app that uses the freeaspupload to add attachement functionality, which means the form encoding type is multipart/form-data. I've done something similar with the persits aspupload component, and had no problems with that, but the freeaspupload version seems to handle <select> fields slightly differently. here's something similar to the code I'm creating... on the form page... <select name="recipient" size="3" multiple> <option name = "bob">bob</option> <option name = "frank">frank</option> <option name = "larry">larry</option> </select> and on the form processing page... recipients = Upload.Form("recipient") Now, normally, I'd expect the variable recipients to end up with all the values that had been selected in the recipient form field, leaving me with (assuming all the names had been selected)... bob,frank,larry ...but I'm only getting... bob Does anyone know how I get all the selected values into a variable/array? (ps. had a look at all the available - and very scant - documentation on the freeaspupload site, with no joy). |
|
#2
|
|||
|
|||
|
<%
itemcount = 0 for each ff in request.form("recepient") itemcount = itemcount + 1 next if itemcount=1 then str="'" &request.form("recepient")& "'" elseif itemcount>1 then str="'" &request.form("recepient")(1)& "'" For i= 2 to itemcount str=str & ",'" & request.form("recepient")(i) & "'" Next end if response.write str %> Hope this solves your problem! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > freeaspupload: retrieving multiple values from a select field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|