Hi folks,
I'm trying to create a section of a website with a unique file upload
utility. The problem is that in most code and components I find to
pass multipart/form data, you need to know the number of files
specified to upload. I'm trying to solve this by having one INPUT
TYPE=FILE box, and, using javascript, each time someone selects a
file, it populates one listbox below it.
Once the submit button is pressed, I'm sending the form elements to
another pages that dynamically generates as many INPUT TYPE=FILE boxes
as necessary, submits the form, then tries to pass that data via the
enctype=multipart/form data FORM tag to another ASP page to handle the
data transfers. The code for the second page is as follows:
<BODY>
<FORM NAME=FormUploadFiles METHOD=POST ENCTYPE="multipart/form-data"
ID=FormUploadFiles ACTION=Upload3.asp>
<%
Dim TempVal, i
TempVal = Split(Request.Form("fnames"), " ")
For i = 1 to Ubound(TempVal)
Response.Write "<INPUT TYPE=FILE NAME=FILE" & i & " VALUE=" &
Chr(34) & TempVal(i) & chr(34) & "><BR>"
Next
Response.Write "<INPUT TYPE=HIDDEN NAME=TotalFiles VALUE=" &
Ubound(TempVal) & ">"
%>
<script type="text/javascript"><!--
document.forms[0].submit();
// --></script>
</FORM>
The code above creates the file elements, and submits the form
automatically, but for some reason, it isn't passing the raw data onto
the next ASP page. Does anyone know why this is, or have any better
suggestions for doing this? I'd rather not use a third party
component if I don't have to.
Thanks
-J 3 3594
"Jason" <op********@aol.com> wrote in message
news:9c**************************@posting.google.c om... Hi folks,
I'm trying to create a section of a website with a unique file upload utility. The problem is that in most code and components I find to pass multipart/form data, you need to know the number of files specified to upload. I'm trying to solve this by having one INPUT TYPE=FILE box, and, using javascript, each time someone selects a file, it populates one listbox below it.
Once the submit button is pressed, I'm sending the form elements to another pages that dynamically generates as many INPUT TYPE=FILE boxes as necessary, submits the form, then tries to pass that data via the enctype=multipart/form data FORM tag to another ASP page to handle the data transfers. The code for the second page is as follows:
<BODY> <FORM NAME=FormUploadFiles METHOD=POST ENCTYPE="multipart/form-data" ID=FormUploadFiles ACTION=Upload3.asp> <% Dim TempVal, i TempVal = Split(Request.Form("fnames"), " ") For i = 1 to Ubound(TempVal) Response.Write "<INPUT TYPE=FILE NAME=FILE" & i & " VALUE=" & Chr(34) & TempVal(i) & chr(34) & "><BR>" Next
You cannot specify a value for a INPUT VALUE="". It's a security feature,
thank god. Imagine if you could upload ANY file from MY computer without me
specifying it. I know in this case you are forming the list of user selected
files, but you can't.
Don Verhagen
ASPUpload will tell you how many files were uploaded with
the form... www.persits.com -----Original Message----- Hi folks,
I'm trying to create a section of a website with a unique
file uploadutility. The problem is that in most code and components
I find topass multipart/form data, you need to know the number of
filesspecified to upload. I'm trying to solve this by having
one INPUTTYPE=FILE box, and, using javascript, each time someone
selects afile, it populates one listbox below it.
Once the submit button is pressed, I'm sending the form
elements toanother pages that dynamically generates as many INPUT
TYPE=FILE boxesas necessary, submits the form, then tries to pass that
data via theenctype=multipart/form data FORM tag to another ASP page
to handle thedata transfers. The code for the second page is as
follows:
<BODY> <FORM NAME=FormUploadFiles METHOD=POST
ENCTYPE="multipart/form-data"ID=FormUploadFiles ACTION=Upload3.asp> <% Dim TempVal, i TempVal = Split(Request.Form("fnames"), " ") For i = 1 to Ubound(TempVal) Response.Write "<INPUT TYPE=FILE
NAME=FILE" & i & " VALUE=" &Chr(34) & TempVal(i) & chr(34) & "><BR>" Next
Response.Write "<INPUT TYPE=HIDDEN NAME=TotalFiles
VALUE=" &Ubound(TempVal) & ">" %> <script type="text/javascript"><!-- document.forms[0].submit(); // --></script>
</FORM>
The code above creates the file elements, and submits the
formautomatically, but for some reason, it isn't passing the
raw data ontothe next ASP page. Does anyone know why this is, or have
any bettersuggestions for doing this? I'd rather not use a third
partycomponent if I don't have to.
Thanks -J .
The problem with ASPUpload, and a lot of the other components designed for
this is that you need to have a specified number of Input boxes. My users
could upload anywhere between one and six hundred files. Hence the problem.
"Steven C" <me*****@hotmail.com> wrote in message
news:14****************************@phx.gbl... ASPUpload will tell you how many files were uploaded with the form... www.persits.com
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steven K |
last post by:
Hello,
I am using an asp page (upload.asp) to gather information and to upload
files to the web server using SoftArtisans SAUpload Tool. In the first page
(upload.asp), I have a form for...
|
by: Gregory A Greenman |
last post by:
I'm trying to write a program in vb.net to automate filling out a
series of forms on a website. There are three forms I need to
fill out in sequence. The first one is urlencoded. My program is...
|
by: NextOne |
last post by:
Hi !
Is it possible to send an AJAX XMLHttpRequest using prototype.js API
for a multipart/form-data ?
I already done parsing form parameters and sending GET/POST request,
but does this work...
|
by: Alex Sibilev |
last post by:
Hello,
I have a really weird problem I've been trying to solve it without any luck
for the last couple of hours :(
I'm writing a "conference board" application (quite similar to ASP.NET...
|
by: ed kool |
last post by:
Question how to code "multipart/form-data” in a PHP script ?
We are trying to make our program trchat.exe work via the following PHP script:
<?php
$lang = " English to Dutch";
...
|
by: scottf35 |
last post by:
Hi,
I am working on (read that - upgrading) an application. This
application creates an HTTPWebRequest object, populates it with values
which are then sucked out of the Request.Form object (eg...
|
by: pbd22 |
last post by:
hi.
could somebody tell me, when uploading a file, i know the form where
the upload component is must
have enctype=multipart/form-data but, is the same true for the form
with the server code to...
|
by: vunet.us |
last post by:
Hi all,
I am converting my app to AJAX-based. I have a form that submits some
data including images. When I use AJAX XmlHttpRequest I am unable to
submit the form with...
|
by: fnoppie |
last post by:
Hi,
I am near to desperation as I have a million things to get a solution
for my problem. I have to post a multipart message to a url that
consists of a xml file and an binary file (pdf)....
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |