Link to home
Start Free TrialLog in
Avatar of phper
phper

asked on

FancyUpload2 onComplete Tweek

I'm using FancyUpload2 from:
http://digitarald.de/project/fancyupload/

I have it working great but I want to have the items removed from the list once they are successfully uploaded. I know it must be an easy fix because FancyUpload2 has a onComplete function, I just don't know how to call it.

The main js page is at:
http://digitarald.de/project/fancyupload/2-0/source/FancyUpload2.js

Below is what is on my page.
window.addEvent('load', function() {
 
	var swiffy = new FancyUpload2($('FILE-status'), $('FILE-list'), {
		'url': $('form1').action,
		'fieldName': 'fieldupload',
		'path': 'fancy.swf',
		'onComplete': function () { removeFile(); }, 
		'onLoad': function() {
			$('FILE-status').removeClass('hide');
			$('FILE-fallback').destroy();
		}
	});
 
	/**
	 * Various interactions
	 */
 
	$('FILE-browse-all').addEvent('click', function() {
		swiffy.browse();
		return false;
	});
 
	$('FILE-browse-csv').addEvent('click', function() {
		swiffy.browse({'Images (*.jpg, *.gif)': '*.jpg; *.gif'});
		return false;
	});
 
	$('FILE-clear').addEvent('click', function() {
		swiffy.removeFile();
		return false;
	});
 
	$('FILE-upload').addEvent('click', function() {
		swiffy.upload();
		return false;
	});
 
});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mltsy
mltsy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial