Greetings!
I'm looking to set a link to Download , not open, a .PDF file on a website. I'm rather hoping I can do this with html, as opposed to js, but I've not been able to locate anything in either forum regarding this need.
Any help is much appreciated.
Thank you!
::huggles::
...tarlah...I did find the following url with information on ASP for what I need, but as I don't have access to ASP for my server, per my host, I'm still hunting for an html or js ability. I also hear there's a PHP way to do it?
The link for ASP, if anyone else needs it, is <!-- m --><a class="postlink" href="http://support.microsoft.com/default.aspx/kb/260519">http://support.microsoft.com/default.aspx/kb/260519</a><!-- m -->.
::huggles::
...tarlah...
((edit: corrected link))It can't be done with HTML or Javascript. It has to be done in the response headers and any server side language/technology can do it.can't you just link to the page? i have never had to make a open a Pdf link...
EDIT
don't you also have to have Adobe reader on client's side?Ray326:
Thank you. I found a PHP bit of code that will perform a similar action. Sadly, I am not able to utilize the ASP due to server-side restrictions.Nebriv:
I can link to the page with no difficulty. I can open the PDF just fine. What I am looking for, and it appears I will need to rely on the PHP code, is a way to offer a simple open or save dialog box for the file. While yes, it is rather simple to tell your users to simply "right click and save as", or open the file in Reader and process things from there, I was merely looking to offer the dialog box for the option of opening or saving the file, to save my users a step or two. :")
-TarlahSave it in a zip./snort
Maryb86:
Oddly enough, I hadn't even thought of that.
No sarcasm intended. I honestly hadn't thought of that, but that does exactly what I'd like to provide my users.
Thank you!
-Tarlah
((Please excuse me while I go /bonk myself.))Lol, glad to be of service .zip-ing it will add an extra stage of hassle to your users when you can simply go for the PHP solution which means practically no difficulty on your users part at all.
The PHP solution is certainly the way to go, unless you are permitted to use .htaccess files?The Tree:
I can use .htaccess with no problems. What did you have in mind?
I was just going to leave the links for the PDF's where they are and add a small Download image for the zip file (at this time, we're only talking about 5 files) as a Download link.
I'm curious about the use of .htaccess, tho!
Thank you!
-TarlahI'm guessing the Tree is thinking you could use the htaccess to override the MIME type for *.pdf files.Yes, just put this into your .htaccess file somewhere:
AddType application/ocet-stream pdf
I'm looking to set a link to Download , not open, a .PDF file on a website. I'm rather hoping I can do this with html, as opposed to js, but I've not been able to locate anything in either forum regarding this need.
Any help is much appreciated.
Thank you!
::huggles::
...tarlah...I did find the following url with information on ASP for what I need, but as I don't have access to ASP for my server, per my host, I'm still hunting for an html or js ability. I also hear there's a PHP way to do it?
The link for ASP, if anyone else needs it, is <!-- m --><a class="postlink" href="http://support.microsoft.com/default.aspx/kb/260519">http://support.microsoft.com/default.aspx/kb/260519</a><!-- m -->.
::huggles::
...tarlah...
((edit: corrected link))It can't be done with HTML or Javascript. It has to be done in the response headers and any server side language/technology can do it.can't you just link to the page? i have never had to make a open a Pdf link...
EDIT
don't you also have to have Adobe reader on client's side?Ray326:
Thank you. I found a PHP bit of code that will perform a similar action. Sadly, I am not able to utilize the ASP due to server-side restrictions.Nebriv:
I can link to the page with no difficulty. I can open the PDF just fine. What I am looking for, and it appears I will need to rely on the PHP code, is a way to offer a simple open or save dialog box for the file. While yes, it is rather simple to tell your users to simply "right click and save as", or open the file in Reader and process things from there, I was merely looking to offer the dialog box for the option of opening or saving the file, to save my users a step or two. :")
-TarlahSave it in a zip./snort
Maryb86:
Oddly enough, I hadn't even thought of that.
No sarcasm intended. I honestly hadn't thought of that, but that does exactly what I'd like to provide my users.
Thank you!
-Tarlah
((Please excuse me while I go /bonk myself.))Lol, glad to be of service .zip-ing it will add an extra stage of hassle to your users when you can simply go for the PHP solution which means practically no difficulty on your users part at all.
The PHP solution is certainly the way to go, unless you are permitted to use .htaccess files?The Tree:
I can use .htaccess with no problems. What did you have in mind?
I was just going to leave the links for the PDF's where they are and add a small Download image for the zip file (at this time, we're only talking about 5 files) as a Download link.
I'm curious about the use of .htaccess, tho!
Thank you!
-TarlahI'm guessing the Tree is thinking you could use the htaccess to override the MIME type for *.pdf files.Yes, just put this into your .htaccess file somewhere:
AddType application/ocet-stream pdf