Making file download instead of opening

C

Corey

The following line of code should as far as I know download the listed file.
But the browser always opens the contents of the file in a new window. Why?
I want to download the file when I click the link, not open the file.

<a href="www.filelocation.com/log.csv">Access Log</a>

Help, thanks.
 
C

Corey

P.S. Right click, save as on the link shows the resultant file as "log.htm"
instead of "log.csv". ???? The file on the server is "log.csv" and ftp'ing
the file down to my computer shows me that it is "log.csv". So why is the
browser treating it differently?

Thanks again,
 
S

Stefan B Rusynko

Can you post a real public URL?




| P.S. Right click, save as on the link shows the resultant file as "log.htm"
| instead of "log.csv". ???? The file on the server is "log.csv" and ftp'ing
| the file down to my computer shows me that it is "log.csv". So why is the
| browser treating it differently?
|
| Thanks again,
|
| "Corey" wrote:
|
| > The following line of code should as far as I know download the listed file.
| > But the browser always opens the contents of the file in a new window. Why?
| > I want to download the file when I click the link, not open the file.
| >
| > <a href="www.filelocation.com/log.csv">Access Log</a>
| >
| > Help, thanks.
 
C

Corey

Sorry I can't. The page this is occuring on is a page that requires a login
due to the fact that the page is sort of an administration page for the site.
I can't give out the login info for the page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top