![]() |
|
|
#1 (permalink) |
|
Registered User
Join Date: Mar 2005
Posts: 5
|
Persits.Upload problem
Hello everyone,
Im having a bit of a problem posting a form using the Persists Upload component. This is a slightly simplified version of the HTML Code:
<form name="drivingschool" method="post" action="edit.asp" enctype="multipart/form-data"> <table> <tr> <td>Driving School Name</td> <td><input type="text" name="drivingSchoolName" value="" /></td> </tr> <td><input type="checkbox" name="features" value="car" checked="checked" />Car Tuition</td> <td><input type="checkbox" name="features" value="motorbike" />Motorbike Tuition</td> </tr> <tr> <td><input type="checkbox" name="features" value="passplus" />Pass Plus</td> <td><input type="checkbox" name="features" value="fleet" />Fleet</td> </tr> <tr> <td>Image:</td> <td><input type="file" name="thumbnail" value="" /></td> </tr> <tr class="<%=rowClass()%>"> <td> </td> <td><input type="submit" name="submit" value="Save" /></td> </tr> </table> </form> When i post the form i can get the all of the posted <input> values but the checkboxes dont seem to work as i expect. If i tick all of the checkboxes and post the form i would expect to get a comma seperated list of the checkbox values. Instead i just get the value of the first checkbox. Code:
If lCase(Request.ServerVariables("Request_Method")) = "post" Then
Set Upload = Server.CreateObject("Persits.Upload")
iFileCount = Upload.Save
Response.Write upload.Form("drivingSchoolName")
Response.Write "<br />"
Response.Write upload.Form("Features")
[rest of the code removed to keep it easy to read]
End If
Regards Ian |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Oct 2004
Posts: 43
|
Just a quick reply here without looking at it closely. It's unlikely to be a bug in Persits because that's a very popular component. It's likely to be an error in your syntax.
I note that all checkboxes have name="features", so it may be that the upload component cannot distinguish between them, hence only one result. Rgds Accelerator |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Mar 2005
Posts: 5
|
Thanks for the reply.
Wouldnt that count as a bug in the component?! It seems to work fine if i submit the form to a normal asp page and Response.Write(Request.Form("Features")). but as soon as i use introduce the upload component it only returns one value. Last edited by Ianhb; 21-07-2007 at 02:29 PM. |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Mar 2005
Posts: 5
|
After much searching I've found the solution, apparently it was in the manual all along!
![]() http://www.codingforums.com/archive/...p?t-60007.html |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|