July 17, 200818 yr Hi all we've got a spot of bother at our company, in that we're all being made redundant. To that end, I'm making a template webpage for the guys so they can put their stuff up on the net - thus making life a lot easier for them while looking for work. Can anyone tell me how to link to a word document - i've tried an href but it doesn't seem to want to open the file i.e: <a href ="cv.doc">CV</a> I'd make an html page for them to edit, but I need to keep it simple for them so ideally all I want them to have to do is bung their CV in a given folder on their server so it get's opened in IE or downloaded.
July 17, 200818 yr Hi allwe've got a spot of bother at our company, in that we're all being made redundant. To that end, I'm making a template webpage for the guys so they can put their stuff up on the net - thus making life a lot easier for them while looking for work. Can anyone tell me how to link to a word document - i've tried an href but it doesn't seem to want to open the file i.e: <a href ="cv.doc">CV</a> I'd make an html page for them to edit, but I need to keep it simple for them so ideally all I want them to have to do is bung their CV in a given folder on their server so it get's opened in IE or downloaded. Maybe put the word document to an pdf It works for me That's how you do it
July 18, 200818 yr just a thought - will it work if you remove the space between href and =? <a href="cv.doc">CV</a>
July 18, 200818 yr Yeah that should definately work without the spaces, as long as the word doc is in the same directory as the html file of course!
July 18, 200818 yr Well if you mean opening the document in Word instead of an in-browser page, you will need to create a backend script for IE. Otherwise it would open in all browsers (such as Firefox and Sefari) with a regular <a href="name_here.doc">NAME</a> . I believe to force a file download you will need to send headers before the file is sent out. You will definitely need to use a technique form PHP, taken from http://www.php.net/manual/en/function.header.php <?php // We'll be outputting a PDF header('Content-type: application/msword'); //or application/vnd.ms-excel // It will be called downloaded.doc header('Content-Disposition: attachment; filename="downloaded.doc"'); // The PDF source is in original.doc readfile('original.doc'); ?> this will allow the file to be opened as an option.
July 18, 200818 yr Well if you mean opening the document in Word instead of an in-browser page, you will need to create a backend script for IE. No you don't, All you need to do is provide a link to the file on the server using the <a> tag and the browser will automatically detect it and allow it to be downloaded and either saved or opened!
Create an account or sign in to comment