You know Randy,
I hope you don't run a helpdesk service. With a bedside manner like that
you wouldn't last long. ;) If you don't have Winzip installed XP, and
probably 2000, will download the file to the Temp area and launch Windows
Explorer to display the contents. If you don't have a Wintel machine then
all bets are off.
As I'm sure you know...If the link is a known mime type <place browser name
here> will either attempt to display it or launch the associated program
after downloading it to the Temporary Internet Files area. If it's an
application mime type a "Save As" dialog box will be displayed. If it's not
a known mime type (file.xyz) the browser will attempt to figure out how to
run it or display it.
I have two file types, MP3 and WMA both are "known" mime types to WinX
operating systems that are reasonably updated. If a person clicks on a link
the file is downloaded to Temporary Internet Files and then played in the
associated application. Media Player 9+ attempts to play the file as it's
downloading. If the bit-rate of the file is higher than the download speed
there's lots of pausing. This is annoying to some people. I would like to
make it as simple as possible for the user to download the file without any
fancy right-click/save target as. Especially since not every browser uses
those terms. I would like for the user to just be able to click on the link
to the file and have the browser ask him where he wants to save it. It
can't be THAT difficult, eh?
--
Kevin Muenzler, WB5RUE
29º14'52"N 98º14'50"W
Eagle Creek Observatory
http://www.eaglecreekobservatory.org
Eagles may soar, but weasels don't get sucked into jet engines.
"Randy Webb" <Hi************@aol.com> wrote in message
news:-M********************@comcast.com...
Kevin Muenzler, WB5RUE wrote:
How do I force a browser to download a file instead of displaying it?
In other words I have a page with MP3 and WMA files on it and I would like
for the visitor to download the file instead of play it without having to
right-click and save.
You don't "force" anything on the web, you suggest:
<a href="URLToMP3File.mp3">Right Click and choose Save As</a>
How can I force the browser to pop up the "save file as" dialog box
instead of playing it? I know that I can encapsulate it in a zip file which
will download and open WinZip.
It does? Wow. I don't even have Winzip on my computer. If you can pull
that one off, you will be a lot smarter than anybody I know. Again, you
don't force anything, and definitely not a download window.
Or give it your own made up extension that the browser won't have
anything associated with.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----