about the download

i have list of pdf document.i have one dropdown and one button for download.i need a function that should download the file ,when we selecting and clicking download
Who is Participating?
David Johnson, CD, MVPConnect With a Mentor OwnerCommented:
Pick your poison
<form method="get" action="file.doc">
<button type="submit">Download!</button>

Open in new window

<a href="path_to_file" download="proposed_file_name">Download</a>

Open in new window

$("#fileRequest").click(function() {
    // // hope the server sets Content-Disposition: attachment!
    window.location = 'file.doc';

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.