google chrome logoDownloading files from a browser requires to go through that nerving save dialog and searching the file afterwards. Google has put up a nice method(in gmail) through which you can simply drag a file-link onto your desktop to download it.

Inspired by a blogpost of the css-ninja which i stumbled upon at ajaxian.com, i quickly hacked this jQuery plugin – „dragout“, which will also be available in SalesKing with the next deploy.
[cc lang=“javascript“ escaped=“true“ tab_size=“2″]
/**
* Download a file by dragging it out of the browser.
* Currently only supported by google chrome browser
* @example
* <a class=“dragout“
* data-downloadurl=“application/pdf:saleking-invoice.pdf:http://salesking.eu“
* href=“http://some-url.de“
* salesking-invoice.pdf
* $(‚.downdrag‘).dragout();
*
* The important part:
* data-downloadurl=“application/pdf:saleking-invoice.pdf:http://salesking.eu“
* data-downloadurl=“mime-type:filename:file-url“
*/
(function($) {
$.fn.extend({

dragout : function () {
var files = this;
if(files.length > 0) {
var use_data = (typeof files[0].dataset === „undefined“) ? false : true;
$(files).each(function() {
var url = use_data ? this.dataset.downloadurl : this.getAttribute(„data-downloadurl“);
this.addEventListener(„dragstart“,function(e){
e.dataTransfer.setData(„DownloadURL“,url);
},false);
});
}
}
});
})(jQuery);
[/cc]
Be aware that this only works in google chrome and firefox beta 4 by now.
UPDATE:
check it out on Github: http://github.com/salesking/jquery-dragout