Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

left click download for pdf file

Status
Not open for further replies.

overflo

Technical User
Feb 10, 2003
70
AU
Can I use JS to enable website visitors to download a pdf file with a left click

Cheers
 
If you mean instead of popping up a box asking them if they want to save / open it, then I'm not sure you can. This would be a server-side configuration thing (making all .PDF files a generic binary MIME type). Ask in the forum for whatever web server you are using for information on how to do this.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I do want the save box to pop-up but currently users need to right click and choose before that happens. If they left click the pdf opens (if adobe is installed on machine). I want the user to left click and then the save box to appear. do you know if this is possible?

Cheers
 
Or put the files you want to 'force download' into a ZIP file. the same goes for audio/video etc... ZIP files always give the download prompt!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top