A simple one: Prompt to open file?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have incorporated a link to a CSV (comma delimited) file in a simple
HTML web page with the following ...

<a href="myfile.csv"> Open MyFile </a>

... and find that, yes, the link is found, but the browser simply
displays the content (text) of the file rather than opening it in a
local application.  What I really need, however, is for the browser to
prompt the user to open the file with his/her choice of application
(e.g. MS-Excel or OpenOffice).

Is there a command/piece of syntax that would force this?

Or maybe there is a setting on my server (Apache) that I need to change?

I have consulted my HTML manuals but so far haven't found anything to
help me so any tips would be gratefully received.

Alan Searle.

Re: A simple one: Prompt to open file?

Using a pointed stick and some pebbles, Alan Searle scraped this into
the dirt:

Quoted text here. Click to load it

You need to add .csv as a filetype in the Apache config, or in an
htaccess file if you don't have access to the main config.


Dylan Parry
http://electricfreedom.org -- Where the Music Progressively Rocks!

Re: A simple one: Prompt to open file?

Dylan Parry wrote:
Quoted text here. Click to load it
Excellent.  It worked.  Many thanks Dylan :-)

Site Timeline