Results 1 to 7 of 7

Thread: left click on link to "save target as"

  1. #1
    Join Date
    Nov 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question left click on link to "save target as"

    Hi

    I want to be able to left click on a link and as a result, the save target as dialog box appears automatically. (So therefore left click = right click & save target as). I hope this makes sense!

    I assume that this would be a javascript solution, but not 100% sure. Any help would be most appreciated.

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Nov 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default purpose of request

    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.

  4. #4
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hi Shane

    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.

    Best rgds, Simonf

  5. #5
    Join Date
    Nov 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default further explanation

    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.

  6. #6
    Join Date
    Sep 2004
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

    thanks so much for your time,

    Nate_Bro

    i was going to start a new thread, but seeing as this is the exact same prob, idk.

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

    How you go about implementing this depends on your server software. With Apache, or software that supports the same directives, you could force all files that end in .doc to have a particular content type with:

    Code:
    <Files *.doc>
      ForceType application/octet-stream
    </Files>
    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •