Few days before I got help-request from one of my friend, they want to download the file using ajax calls. I though of sharing jQuery.fileDownload.js plugin, which was created by johnculviner two years before.
What is jquery.fileDownload.js ?
Its a jQuery plugin which support cross server platform compatible, also works with multi browser. Support lots of methods like success and fail feature, which is like plug and play.
First we will include the jQuery library and file-download (jqueryfiledownload.apphb.com site).
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://jqueryfiledownload.apphb.com/Scripts/jquery.fileDownload.js"></script>
We will add simple script which will download the file from it.
Here come’s our html part, will execute above script to download the file.