Grow your CSS skills. Land your dream job.

Save link as when left clicked

  • # January 30, 2010 at 4:18 pm

    Is there any way to create an anchor link that when it is left clicked, the save as dialog box comes up for the target file (targetfile.mp3 for example)?
    It seems like it should be able to be done with javascript (even though it could be a security vulnerability to users), but I cant figure out how. I am no javascript guru and I cant for figure it out, even with lots of searching on the net.

    Any ideas?

    # January 31, 2010 at 3:31 pm

    The easiest way would just to put it in a zip file and make it available for download, but if you really need this functionality you can get it done with apache, depending on how familiar you are with it. Rather than re-hashing all the info, I’m going to point you here: http://www.dynamicdrive.com/forums/arch … t-909.html. It looks like they have some good advice, especially this for apache:

    Code:

    ForceType application/octet-stream
    # February 3, 2010 at 2:48 pm

    Thanks. I had thought about the zip file thing also. Unfortunately this is for a dynamic sites podcasting feature (Drupal). So in order to do that, and have a listen online function, I would have to have both the zip file and the .mp3 attached to each episode. Which wouldn’t be hard, but it probably wouldn’t be the best work flow. Thanks for the link, I will check it out.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".