Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

File download jquery

//
//With jquery.fileDownload.js
//custom use with promises
//
$(document).on("click", "a.fileDownloadPromise", function () {
    $.fileDownload($(this).prop('href'))
        .done(function () { alert('File download a success!'); })
        .fail(function () { alert('File download failed!'); });
 
    return false; //this is critical to stop the click event which will trigger a normal file download
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: split in javascript 
Javascript :: regex js 
Javascript :: AJAX JAVASCRIPT FUNCTION CALLS 
Javascript :: get keys of object js 
Javascript :: divide an array based on length js 
Javascript :: position of the mouse cursor javascript 
Javascript :: how to add footer in every page jspdf 
Javascript :: react native app crashing on start 
Javascript :: js json escape 
Javascript :: big o notation javascript 
Javascript :: Slice and Splice -Javascript 
Javascript :: react click outside class implementation 
Javascript :: pwa in angular 
Javascript :: next js cookie 
Javascript :: try catch js 
Javascript :: sequelize one to many 
Javascript :: node js file dowload progress bar 
Javascript :: new array from javascript 
Javascript :: start live server react js 
Javascript :: how to code a discord bot in javascript 
Javascript :: how to convert string to number in javascript 
Javascript :: simple javascript 
Javascript :: useRoutes 
Javascript :: react: fow to use find(to get the id of a element 
Javascript :: js error handling 
Javascript :: swift encode json 
Javascript :: Automatic Slideshow in react js 
Javascript :: Sort() functions 
Javascript :: angular custom directive 
Javascript :: open modal on clicking select option in react 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =