downloading file js code example
Example: javascript download file
$('a#someID').attr({target: '_blank',
href : 'http://localhost/directory/file.pdf'});
$('a#someID').attr({target: '_blank',
href : 'http://localhost/directory/file.pdf'});