Search


Change Language


Ajax Downloads Home arrow Ajax File Manipulationarrow Upload Systems
Free AJAX Scripts by Freeajaxscripts.net
Asynchronous File Upload in YUI - AJAX Script

YUI is a truly amazing framework for those who are writing Ajax applications. Its JavaScript widgets allow programmer to create richly interactive UI components with ease. However, these UI widgets are not very useful unless the end result of the interaction can be saved to the server side. Hence YUI has added Ajax support to most of its widgets. While many people are familiar with YUI Connection Manager's Ajax capability, only a few know that Connection Manager can be used to simulate Ajax-like file upload.

The theory that makes asynchronous file upload work is not complicate, but the code for it to work can be a little bit lengthy if it was developed from the scratch. Since there no reason to reinvent the wheel and YUI's Connection Manager can take care of most of the dirty jobs for us, in this article, I'll show you how to use it to do a simple asynchronous file upload. Because XMLHttpRequest object does not support file upload, the Connection Manager uses inline frame approach. Basically what the Connection Manager does is it creates an invisible IFRAME for file upload and parses the server response once the upload is completed. In the end, what you get is an illusion of Ajax-like file upload interaction. However, since this is an IFRAME, some Ajax events such as success or failure are not available in IFRAME method as they are available in regular Ajax request in YUI.

 



Recommend this listing to your friend
From:
Your Name:
Your E-mail:
To:
Friend's Name:
Friend's Email:

Script Information
Website: Website
Demo: Demo
Download: Download
Hits: 926
Added: 2008-01-30 06:55:14
Last updated: 2008-01-30 06:58:03
Credit Cards Mortgage Calculator Free File Hosting Credit Cards Buy PSP
There are 221 free ajax scripts and 31 categories in our directory





Lost Password?
No account yet? Register
We have 9 guests online