Dynamic Drive Forums > General Coding > Other > left click on link to "save target as"
Naughty double poster. No cake for you.
You could put the file in a .zip, that'd do it. Then link to the zip file.
the purpose of this is that i want to be able to list a number of (e.g.) word documents, giving the option to only save by clicking. its for a members web site so has to contain the word documents and not zip files.
Firstly I would not necessarily place word documents on the web as these could be easily modified by people (depends if the info is propriety etc), but rather place PDF's as they are smaller and hence save download times etc. Then I would open the PDF in a separate window (so it does not detract from your page) and provide the option that allow then to save/print etc.
Thanks for that post Simon.
The site is a password protected member site. Documents have to be a combination of word/pdf files (even excel sheets at times), I can not dictate the file type unfortunately.
The way I wanted to setup a page was so that you would have the name of this file to download, followed by an open button (which would open the file in a new window), and then a save button, so that one click gives you the save option. I want/have to do it this way as I am dealing with computer iliterate people who can just about grasp browsing the web, so everything has to be as simple as possible.
Many thanks if you or anyone can help me further.
I have the same problem with a page I'm working with.
pdf files and word doc, are the files that are going to be up loaded, and unless I can find a way to place a copy of the file in a zip file though the cgi script, I'll need the link to open a Save As... window.
i was going to start a new thread, but seeing as this is the exact same prob, idk.
The correct way to approach this is through the Content-Type header, sent by the server in response to a request. If it is set to a value that is not associated with a particular application, plug-in, or behaviour, a user agent will typically prompt the user and allow them to choose what to do. The usual content type used for this is application/octet-stream, which means nothing more than arbitrary binary data.