Over on StickBlog, there’s a nice little demo of using AJAX to provide a nice, clean interface for uploading multiple files in a web form. Only one file input is displayed at a time. As you add files, the input is replaced with information about the file, and a new file input is dynamically added. Simple and slick.
-
Meta
-
Subscribe
-
Referrals
What I'm Doing...
- @KaaSerpent Replacement earworm for you: http://tinyurl.com/3gxm97 3 days ago
- Upgrading VMWare 3 days ago
- @michalnolan I *like* that song :) But I never noticed that it was Chaka Khan before! backatcha: http://tinyurl.com/6jp6mx 3 days ago
- @michaelnolan Are you old enough to be familiar with bad 70s music? I'd hate for you to get "Ring My Bell" stuck in your head. Oops... 3 days ago
- @ariedana Is your Tiny Book of Calm hollowed out so that it holds a Tiny Bottle of Booze? :) 3 days ago
- More updates...
Powered by Twitter Tools.
Blog Meta
Buttons
Currently Reading
Dougal's Stuff
Misc Stuff
Projects
Tangential
Tech News
Technology and Design
- 0xDECAFBAD
- adrian holovaty
- Ben Hammersley
- Bill Zeller
- Brent Ashley
- CSS Edge
- design PRINCIPLES
- designmeme
- Digital Divas
- Dynamically Typed
- Hal Rottenberg
- Hixie’s Natural Log
- istockphoto
- Jakob Nielsen
- JavaScript Zen
- Joel Webber
- Mark Simonson
- Phil Ringnalda
- phpPatterns()
- Pla.NET Southeast!
- RevJim
- Rosko’s Ramblings
- Sam Ruby
- Scott Andrew and the Walkingbirds
- Simon Willison
- Tantek Çelik
- TechnoMagician
- WebGraphics
- Weblog Tools Collection
- Wordlog
- youngpup
- Zeldman
WordPress Team
-
Pages















5 Comments
Also, see Simultaneously uploading some files using
IFRAMEelements.Dougal, I read that article yesterday and though his script does some nice DOM manipulation, it isn’t AJAX. The uploading is done by an HTML form post. This is just another case of buzzword misuse. :-/
Well, technically, no, it’s not AJAX (it’s not Asynchronous or XML). It’s more traditional DHTML. However, this demo accomplishes one of the same goals that typical AJAX use does — it manipulates the web page view without refreshing. Yes, yes, it’s still not AJAX, and people have been doing similar things for years. But I’m not inclined to be pedantic over the use of the AJAX label.
WTF is going on ?
Why the heck are so many “gurus” calling it “Ajaxian” ???
I’m no guru in Ajax/DHTML so I wasted a couple hours trying to find the AJAX in that neat solution. doh !
Well, it shouldn’t take you hours to understand the source, as it’s just using an iframe and a regular form post, took me 1 minute or so. It works…but I guess it doesn’t have any of the benefits of AJAX, i.e. the ability to deal with errors and stuff and it would be nice to be able to create a progress bar. This has been done though. If you do read a lot you’ll find that you can’t use the XMLHTTPRequest object anyways at all for file transfers. So, seeing that we are able to basically do AJAX requests for any other type of form element minus that one, we have to use iframe and eventhough this isn’t AJAX per se, it is using something else in order to get the same functionality.
2 Trackbacks
[...] Hat Tip: geek ramblings [...]
[...] StickBlog has written a great little Ajax-based file upload utility. You can set the number of files allowed at a time, and as you upload, the display is updated with the current files, which you can remove and replace at will.Now, if only I had the time to re-write the Attach Files plugin for WordPress by Gordon Knoppe to use this… THAT would be cool!Hat Tip: geek ramblings [...]