468,238 Members | 1,712 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,238 developers. It's quick & easy.

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

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
3 7752

"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
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
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.

Similar topics

2 posts views Thread by Donald Firesmith | last post: by
1 post views Thread by Victor | last post: by
1 post views Thread by j7o0s5 | last post: by
4 posts views Thread by Anastasios Hatzis | last post: by
3 posts views Thread by ajay2552 | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.