View Full Version : Multiple file upload AJAX

02-26-2010, 05:31 AM

I need a multiple file upload AJAX component. The requirement is each file should able to be uploaded individually with a individual submit button.

Also individual progress bar should be there. I am ready to go ahead with any suggested javascript frameworks.

Please let me know at the earliest. Let me know if you are expecting any more inputs from me.

Thanks in Advance for your time and attention.

03-08-2010, 08:46 AM
Hi, Can anyone help me on this. Thanks in advance

03-08-2010, 08:50 PM
This should work:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript">
function example_ajax_request(page){
$('#example-placeholder').html('<p><img src="http://www.electrictoolbox.com/images/ajax-loader.gif" width="220" height="19" /></p>');
setTimeout(function(){example_ajax_request_go(page);}, 500);
function example_ajax_request_go(page){


<a href="javascript:void(0)" onclick="example_ajax_request('external1.html');">External 1</a><br>
<a href="javascript:void(0)" onclick="example_ajax_request('external2.html');">External 2</a><br>

<div id="example-placeholder"><a>External file will appear here</a></div>


Replace the external files with existing ones.
Arie Molendijk

03-08-2010, 09:01 PM
molendijk, can you explain all parts of this script? which line what thing does?

03-08-2010, 09:14 PM
The online jquery script on top is the library you need.
With the function example_ajax_request(page) you can include external files by doing something like onclick="example_ajax_request('some_external_page.html');"
The function example_ajax_request_go(page) together with the line containg the loader gif take care of the progress bar.
The div with the placeholder indicates the location of the external file.

03-08-2010, 09:44 PM
so if I will write in some_external_page.html line "hello", in div I will see it?

03-08-2010, 09:50 PM

03-08-2010, 09:55 PM
and everything will work without refreshing the page?

03-08-2010, 09:58 PM
also, offtopic thing :D

I want to create image which is grey normally, but when someone puts his mouse on it, he will became blue and finishes in 3 seconds... I think it has something in common with

But I don't know what function to use, .click() is not good for this.

03-09-2010, 11:31 AM
Auriaks, yes, everything without refreshing the page.
As for the image, I suggest to google around.