By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,790 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,790 IT Pros & Developers. It's quick & easy.

How to create an <a> to download a file?

P: n/a
For example, I want to create a link to download html or mp3 file instead of
show it in browser or launch media player to play it....
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"nick" <nb***@removethis.hotmail.com> wrote in message
news:cb**********@news3.bu.edu...
For example, I want to create a link to download html or mp3 file instead of show it in browser or launch media player to play it....


href="URL of file"

Whether it plays in the browser or is downloaded is a function of the
browser's configuration and is something over which you have no control--and
over which you *should* have no control. If your concern is about users who
want to download your files but whose browsers open them directly and who
don't know how to change that, you can offer a note suggesting that they use
their browser's alternate to clicking for downloading files (such as using
"Save target as" on IE's shortcut menu).

Jul 20 '05 #2

P: n/a
nick <nb***@removethis.hotmail.com> wrote:
For example, I want to create a link to download html or mp3 file instead of
show it in browser or launch media player to play it....


See the answer to the Frequently Asked Question, "How do I force the
browser to download a file? How do I force the browser to show/play a file
itself? How do I force a file to be opened by a particular program?"
http://www.htmlhelp.com/faq/html/med...force-download
--
Darin McGrew, da***@TheRallyeClub.org, http://www.TheRallyeClub.org/
A gimmick car rallye is not a race, but a fun puzzle testing your
ability to follow instructions. Upcoming gimmick car rallye in
Silicon Valley: The Suppranos (Saturday, July 3)
Jul 20 '05 #3

P: n/a
nick wrote:
For example, I want to create a link to download html or mp3 file instead of
show it in browser or launch media player to play it....

Make it an FTP connection.

--
jmm dash list at sohnen-moe dot com
(Remove .TRSPAMTR for email)
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.