469,289 Members | 2,225 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Persits.Upload.1 and multiple checkbox

I have an ASP script which is used to upload files with Persits.Upload.1
object. But I can't get the values from mutliple checkboxes in the form like
normally.

<form method="post" ENCTYPE="multipart/form-data"....>
<input type="checkbox" name="language" value="English">English
<input type="checkbox" name="language" value="Spanish">Spanish
<input type="checkbox" name="language" value="Chinese">Chinese

Please advice!
Jan 16 '06 #1
4 12763

Vanessa wrote:
I have an ASP script which is used to upload files with Persits.Upload.1
object. But I can't get the values from mutliple checkboxes in the form like
normally.

<form method="post" ENCTYPE="multipart/form-data"....>
<input type="checkbox" name="language" value="English">English
<input type="checkbox" name="language" value="Spanish">Spanish
<input type="checkbox" name="language" value="Chinese">Chinese

Please advice!


What's your code to retrieve those values? You can't use request.form,
you need to create the Persits object such as

Set Upload = Server.CreateObject("Persits.Upload.1")
thelanguage=upload.form("language")

Jan 16 '06 #2
Larry,

Here is my test code:

<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" then

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.IgnoreNoPost = True
Upload.OverwriteFiles = true
Upload.SetMaxSize 3048576
Upload.SaveToMemory

Response.Write "Upload.Form(""language""): " & Upload.Form("language") &
":<BR>"

else
%>

<form method="post" action="testcheckbox.asp" enctype="multipart/form-data">
<input type="checkbox" name="language" value="English" checked>English<br>
<input type="checkbox" name="language" value="Spanish" checked>Spanish<br>
<input type="checkbox" name="language" value="Chinese" checked>Chinese<br>
<input type="submit" name="submit" value="submit">

</form>

<% end if %>

It only get the first checked values, but not all checked values. For
example, if I checked English and Spanish, only English is returned from
Upload.Form("language"). Please advice.

Vanessa

"Larry Bud" wrote:

Vanessa wrote:
I have an ASP script which is used to upload files with Persits.Upload.1
object. But I can't get the values from mutliple checkboxes in the form like
normally.

<form method="post" ENCTYPE="multipart/form-data"....>
<input type="checkbox" name="language" value="English">English
<input type="checkbox" name="language" value="Spanish">Spanish
<input type="checkbox" name="language" value="Chinese">Chinese

Please advice!


What's your code to retrieve those values? You can't use request.form,
you need to create the Persits object such as

Set Upload = Server.CreateObject("Persits.Upload.1")
thelanguage=upload.form("language")

Jan 16 '06 #3

Vanessa wrote:
Larry,

Here is my test code:

<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" then

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.IgnoreNoPost = True
Upload.OverwriteFiles = true
Upload.SetMaxSize 3048576
Upload.SaveToMemory .....

Vanessa, you need to read the manual. I don't have Persits installed
on my machine, but since you do, you should have the Form3.asp demo
page that they're talking about.

http://www.aspupload.com/manual_simple.html
From the section titled

"Referencing Individual File and Form Items"

The Upload.Form collection is not entirely identical to Request.Form as
******it handles multi-select form items such as <SELECT MULTIPLE>
differently.*******

A multiple checkboxes with the same name are probably handled like a
select multiple.

Jan 16 '06 #4
Got it! Thanks Larry! :) You save my day!

"Larry Bud" wrote:

Vanessa wrote:
Larry,

Here is my test code:

<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" then

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.IgnoreNoPost = True
Upload.OverwriteFiles = true
Upload.SetMaxSize 3048576
Upload.SaveToMemory

.....

Vanessa, you need to read the manual. I don't have Persits installed
on my machine, but since you do, you should have the Form3.asp demo
page that they're talking about.

http://www.aspupload.com/manual_simple.html
From the section titled

"Referencing Individual File and Form Items"

The Upload.Form collection is not entirely identical to Request.Form as
******it handles multi-select form items such as <SELECT MULTIPLE>
differently.*******

A multiple checkboxes with the same name are probably handled like a
select multiple.

Jan 16 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by .Net Sports | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.