Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
HTML/CSS Trigger a save as dialog?
Does anybody know how to trigger a save as dialog off of a text link? What I'm trying to do is have text that says Download Now that when clicked downloads a word doc. Right now when I just have the text linking to the file it doesn't work, has something like file not found. Thanks!
2 Answers
- Anonymous1 decade agoFavorite Answer
Download Link:
You have to zip the file to trigger the browser's response to Save File. Otherwise, it will call a program to play/open the media/PDF file.
How to Zip or Unzip a file:
How to Make a Zip File or Compressed File: http://www.ehow.com/how_5023369_make-zip-file-comp...
http://www.mantex.co.uk/samples/down-zip.htm
http://office.microsoft.com/en-us/help/HA011276901...
How to create and use compressed (zipped) folders in Windows XP: http://support.microsoft.com/kb/306531
How To Make A ZIP File (Video): http://www.youtube.com/watch?v=ahATyKyfRdk
Making an image a download link:
<p><a href="URL path to zipped file" title="Mouseover Description"><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description"></a></p>
Download Text Link only:
<p><a href="URL path to zipped file" title="Mouseover Description">Link Text Description</a></p>
Open Main Page and Affiliate's:
<p><a href="http://mainlinkhere/%22 onclick="window.open('http://affiliatelinkhere','newwin');"/ title="affiliate product's name"><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description"></a></p>
You can change the "p" tags to div tags and style as needed.
Forcing File Downloads in PHP: http://elouai.com/force-download.php
Using PHP Headers to Force Download: http://www.ryboe.com/tutorials/php-headers-force-d...
Ron
- Anonymous1 decade ago
<a href="location_to_file"> Download </a>
Your issue is that you don't have the location of the file correct.
Or,
You're trying to use a local link, like C:\Users\Pictures\wtf-lol.jpg
That link is local and will not work for anyone that is not on your computer.
You need to upload whatever that document is to an online environment, where you can direct the link to.
Nothing else matters, if you don't have the link right, there will be no prompt to download.
Source(s): 15 + Years.