Activate your free membership today | Log-in

Monday, April 28th, 2008

FancyUpload: Swiff meets Ajax

Category: Component, Flash, JavaScript, MooTools

<>p>FancyUpload

Harald Kirschner has created a new version of FancyUpload "a file-input replacement which features an unobtrusive, multiple-file selection menu and queued upload with an animated progress bar."

A good example is the Queued Photo Uploader which is coded by:

JAVASCRIPT:
  1.  
  2. var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
  3.         'url': $('form-demo').action,
  4.         'fieldName': 'photoupload',
  5.         'path': '../../source/Swiff.Uploader.swf',
  6.         'onLoad': function() {
  7.                 $('demo-status').removeClass('hide');
  8.                 $('demo-fallback').destroy();
  9.         }
  10. });
  11.  
  12. /**
  13. * Various interactions
  14. */
  15. $('demo-browse-all').addEvent('click', function() {
  16.         swiffy.browse();
  17.         return false;
  18. });
  19.  
  20. $('demo-browse-images').addEvent('click', function() {
  21.         swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'});
  22.         return false;
  23. });
  24.  
  25. $('demo-clear').addEvent('click', function() {
  26.         swiffy.removeFile();
  27.         return false;
  28. });
  29.  
  30. $('demo-upload').addEvent('click', function() {
  31.         swiffy.upload();
  32.         return false;
  33. });
  34.  

Related Content:

  • Ajax Learning Guide
    Chances are, you've been doing JavaScript and XML developer work in Lotus Domino for quite some time. This old/new approach is causing quite a stir in...
  • Ajax missing link in Java EE?
    Is the Java Enterprise Edition the right platform for developing Ajax applications for the emerging Web 2.0 world? Joe McKendrick ponders what it will...
  • Ajax meets Java EE
    Despite their differences, there are ways to ease the integration of Ajax with Java EE, according to an article on IBM Developerworks. The problem...
  • Ajax all the buzz at Eclipse conference
    Attendees at EclipseCon 2006 are taking a cautious, yet enthusiastic approach toward...
  • IBM extends Eclipse functionality to simplify Ajax development
    IBM has boosted the open source Eclipse integrated development environment project by adding support for Open Asynchronous Javascript + XML...

Posted by Dion Almaer at 8:37 am
3 Comments

++++-
4.5 rating from 87 votes

3 Comments »

Comments feed TrackBack URI

Pretty nice! The UI updates are cool, sliding by percentage “milestone” for lack of a better word, rather than moving a few pixels on each progress update call or what have you.
 
Would you say this has fulfilled your wish, Dion, for a progressively-enhanced multi-file uploader? (I forget the exact wording.)

Comment by Schill — April 28, 2008

Is a jquery port possible?

Comment by Aimos — April 28, 2008

Its not so much porting FancyUpload to JQuery. Its Swiff that needs to be ported – that the Flash/Javascript wrapper that this uses, which is part of MooTools.

See: http://blog.mootools.net/2008/2/12/what-s-new-in-1-2-swiff

Comment by Unfocused — April 28, 2008

Leave a comment

You must be logged in to post a comment.