Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 3rd, 2005, 07:30 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems regarding upload functionality

It is very frustrating that it is not possible to upload multiple files. The solution suggested at the link posted in this thread is really not as powerfull as I had hoped for.

The problem is that every time the add button is clicked in order to move the selected file to the selected list, it will actually upload the file; i.e. the file is not uploaded when the upload button is clicked. When the upload button is clicked they are just saved to the server from memory. The solution will therefore also have all pictures in memory before clicking the upload button.

Well, my first though (probably not well though-through) was to add the files selected to the list dynamically (client-side) using java script and then upload them using server-side as in the example. The thing I missed was the fact that I cannot post items added through java script, or am I wrong on this?
<script language="javascript">
function addFile()
    var option = document.createElement("option");
    option.text = document.upload.file.value;
<form name="upload">
    <input id="file" type="file" onchange="addFile();" style="width:400px;" /><br/>
    <select id="files" multiple="true" style="width:400px;" size="10" />
I found a similar version here.

Since the page is not reloaded, the items are not really added to the page why the ASP.NET server-side code cannot see the items added. Moreover, the above script only add the text and not the input object (this could be fixed).

Then I have searched for another solution on the web, however, no solutions that would do the trick have come up. How can I make an good upload solution? This problem must have been solved before

I found several solutions where java script was used to generate an MSXML object and the post the document to the web server, where an ASP document picked up the request, but I can't make it work. See e.g. here...

Any comments on this solution? And is it possible to have ASP.NET pick up the request? Experiences?

I am dying for a solution. This problem is super annoying.

Thanks, Jacob.
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
Old January 2nd, 2007, 06:38 AM
Friend of Wrox
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran

hi jacob,
i found a java software for mulipule file upload, we bought tha licence.
it is very nice.
have a look

(Anything is Possible)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit access to upload page functionality jacob ASP.NET 1.0 and 1.1 Professional 2 November 23rd, 2005 03:02 PM
asp file upload script having problems with MYSQL paulmcn Classic ASP Databases 0 September 16th, 2005 01:26 PM
Whole Folder upload(Multi file Upload) ramasamy_rams XML 1 September 9th, 2005 12:43 PM
Chapter 7 file upload problems GranDad BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 August 27th, 2005 02:29 PM
File upload problems in PHP 4.3.2 clem_c_rock Pro PHP 2 November 1st, 2004 10:49 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.