Is it possible to download a file given filepath using javascript/jquery?
I use json data with jquery... I have filepaths in json and i am i开发者_StackOverflowterating with jquery...
var divs='';
$.each(jsob.Table, function(i, user) {
divs += '<a class="download" href=' + user.resume_path + '/>'
});
$("#ResultsDiv").append(divs);
It works but how to make my anchor open file/save
dialog box where the admin can download that resume... Any suggestion...
Whether or not a document triggers a file save dialog is dependent on how the browser handles that file type. If it's something the browser knows how to display, either natively or via a plugin of some sort, it will display in the browser. If not, then the user will be prompted to save the document.
精彩评论