The YUI Library () is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX
Among the free set of libraries, using Connection Manager library we can easily handle AJAX requirements.
We can handle file uploading in AJAX with this library.
To use Connection Manager, include the source file and its dependency in your web page with the script
<script src="http://yui.yahooapis.com/2.7.0/build/yahoo/yahoo-min.js"></script>
<script src="http://yui.yahooapis.com/2.7.0/build/event/event-min.js"></script>
<script src="http://yui.yahooapis.com/2.7.0/build/connection/connection-min.js"></script>
Y! corp always sees to it that these files are always optimized and encourages us to link the files from their server itself. So no harm is calling these from their server
All the required info is put in detail at the following link
Here it's explained about creating the connection manager object and about writing the call back handleer functions.
The special scenario of handling file upload is also explained in detail.
Regards
Thomas