When you make a link to a PDF file that is in your own site root, how can you make a link back with out having to use the back arrow on the browser, can any one help please thanks Jeff
The most elegant way is to force a download similar to what would happen if you had a linked Word document.
If you have access to PHP, have a look here or if you want to use JS have a look at this answer http://stackoverflow.com/questions/365777/starting-file-download-with- javascript
Gramps
Sorry, here is the PHP link http://webdesign.about.com/od/php/ht/force_download.htm
Message was edited by: Altruistic Gramps
Hi Gramps By the way I became a Gramps myself about three weeks ago my first grandson, “great feeling”. Anyway just to make sure we are singing from the same song sheet, what I want to do is, is create an accessories page using small pdf files to contain the items, so basically I will make a list of links, with a short name/reference and maybe a thumb nail picture by it, so the customer can click the link to go to the pdf and after their finished can click another link back to the original link, and so on, on my tips and trick page I have created on the third link down, a link to a pdf files, but I can’t work out how to get back without using the back arrow on the browser.
Thanks Jeff
Congratulations, I enjoy the grandkids more than I did my own kids, mainly because have more time on my hands.
I know that PDF files do open in a browser window, but for years now, I have claimed that a PDF file should open in its native document window because its behaviour is different to an HTML document. There is nothing more confusing to us oldies then to click on a PDF link only to find that we have lost our original page. The PDF page looks different and we do not realise that we have to click the back button to return to the original page. If we click a Word link, we are taken to Word to show the document. The same applies to an Excel link, then why not a PDF link.
If you go to http://pleysier.com.au/jeffrey/ you will see what I mean. Try in different browsers to see how each reacts differently.
The document markup can be seen when you view the source code. The script for pdf_dl.php is as follows
<?php
if (isset($_GET['file'])) {
$pdffile = $_GET['file'];
header('Content-disposition: attachment; $pdffile.pdf');
header('Content-type: application/pdf');
readfile(''.$pdffile.'.pdf');
}
?>
Gramps
North America
Europe, Middle East and Africa
Asia Pacific